Skip to content

Commit 21393b9

Browse files
committed
be resiliant to jwt version
1 parent bd768d5 commit 21393b9

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

LICENSE.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
Copyright 2017, Massimo Di Pierro
22

3+
Preamble
4+
========
5+
6+
The py4web code is developed by Massimo Di Pierro and other contributors in their own free time. They collectively agree to release the code under the BSD license show below. Whoever contributes code to py4web implicitly agrees to the BSD license. When developers contribute a significant part of code that has applications independent of py4web they are also free to release such code separately under different additional licenses, as long as this does not conflict with the BSD license. If code is copied from a third party source, it is the responsibility of the developer to make sure that it is compatible with the BSD license and to include the proper attribution. If code is developed under a sponsorship agreement or other paid agreement with a third party, this must also be disclosed in a comment within the code. The py4web trademarks are not released under the BSD license but are regulated by the "py4web trademark policy" also shown below.
7+
8+
BSD License
9+
===========
10+
311
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
412

513
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
@@ -8,4 +16,19 @@ Redistribution and use in source and binary forms, with or without modification,
816

917
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1018

11-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20+
21+
Py4web Trademark Policy
22+
=======================
23+
24+
The name (py4web) and logo (the axolotl), collectively known as "the trademarks" are copyrighted by Massimo Di Pierro and excluded by the BSD license. Exactly because we make our code available to download and modify, proper use of our trademarks is essential to inform users whether or not we stand behind a product or service. Users of the trademarks must comply with the following rules:
25+
26+
1. The trademarks, when embedded in a page, must include links to https://py4web.com
27+
28+
2. The trademarks, when embedded in printed text must include a caption "official py4web logo copyrighted by Massimo Di Pierro (https://py4web.com)"
29+
30+
3. The trademarks must not be used in derivative products other than in the required expression "Derived from py4web" linking https://py4web.com.
31+
32+
4. The trademarks should not be included in commercial products other than in the required expressions "Powered by py4web" linking https://py4web.com
33+
34+
5. The trademarks should not be used in any form which implies that the py4web developers are collectively endorsing any tool or product other than pyweb.

py4web/core.py

+2
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ def save(self):
622622
cookie_data = jwt.encode(
623623
self.local.data, self.secret, algorithm=self.algorithm
624624
)
625+
if isinstance(cookie_data, bytes):
626+
cookie_data = cookie_data.decode()
625627

626628
response.set_cookie(
627629
self.local.session_cookie_name,

0 commit comments

Comments
 (0)