Git Product home page Git Product logo

cookie's People

Contributors

brycefisher avatar emberian avatar jupp0r avatar mcreinhard avatar michaelsproul avatar reem avatar theptrk avatar trotter avatar veeti avatar zzmp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cookie's Issues

No way to distinguish unsigned/signed cookie

Although cookie signing is supported, I don't see a way to figure out if a cookie value is actually trusted and authenticated. For example, the count example has signing enabled, and it works as expected when a bad signature is detected:

# Bad signature on cookie.
[veeti@veeti-pc examples]$ http localhost:3000 'Cookie: count=s:9999.asd'
Hit Counter: 1

But what happens when you don't include a signature at all?

[veeti@veeti-pc examples]$ http localhost:3000 'Cookie: count=9999'
Hit Counter: 10000

Most frameworks and libraries seem to provide separate collections for regular and signed/secure cookies. Perhaps the same should be done here.

Sign key and expiration time of cookie

It would be a good idea to sign the key of the cookie (so that you can't use a value signed for key A with key B), and possibly the max age/expiration of the cookie (and then validate that it hasn't passed).

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.