Giter Site home page Giter Site logo

pallets-eco / secure-cookie Goto Github PK

View Code? Open in Web Editor NEW
32.0 7.0 18.0 170 KB

Secure cookies and sessions for WSGI

Home Page: https://secure-cookie.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
python wsgi session cookie itsdangerous werkzeug

secure-cookie's Introduction

WSGI Secure Cookie and Session

Provides interfaces for secure cookies and sessions in WSGI applications. Secure cookies are cryptographically signed (but not encrypted) to prevent tampering. Sessions are data associated with a given user across requests and responses.

Install

Install in a virtualenv with pip:

$ pip install secure-cookie

secure-cookie's People

Contributors

davidism avatar dependabot-preview[bot] avatar dependabot[bot] avatar jab avatar northernsage avatar pjdewitte avatar pre-commit-ci[bot] avatar sblondon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

secure-cookie's Issues

Drop py36 support

Py36 has reached the end of its life and should not be supported anymore. I'm opening the issue for the sake of documentation, will write PR for it soon.

Support for Werkzeug 2.1.0+

Werkzeug version 2.1.0 made several changes which break secure-cookie:

  • Remove safe_str_cmp function. Use equivalent in hmac modules instead.
  • Remove detect_utf_encoding, it's built-in to json.loads.

Therefore, the imports no longer work.

I'll make a PR for this.

Create path used by FilesystemSessionStore

secure_cookie.session.FilesystemSessionStore() does not check if the path provided as second argument exists.

If the directory, a FileNotFoundError is raised when self.store.save(session) is called.

I think the __init__() method should create automatically the directories if they don't exist.
Another solution is to raise an error in the __init__() method.

What do you think about it? I can do a PR according to your preferences.

No PyPI releases

The latest version of Werkzeug deprecated things from the contrib package and points users to this library.

DeprecationWarning: 'werkzeug.contrib.sessions' is deprecated as of version 0.15 and will be removed in version 1.0. It has moved to https://github.com/pallets/secure-cookie.
DeprecationWarning: 'werkzeug.contrib.securecookie' is deprecated as of version 0.15 and will be removed in version 1.0. It has moved to https://github.com/pallets/secure-cookie.

The issue is this library appears to be incomplete and there are no releases on PyPI for it at the moment.

Copy posixemulation from Werkzeug

werkzeug.posixemulation is an internal module that was only in use by the filesystem session store. Forgot to copy it over to secure-cookie, but it will be deprecated in Werkzeug 2.0 (pallets/werkzeug#1759). Copy it over and release 0.1.1.

Would also be good to evaluate whether it's even needed anymore.

New release?

Hello,
Any plans for a new release in pypi?
The latest werkzeug version is incompatible with the latest secure-cookie.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.