iron-graveyard / cookie Goto Github PK
View Code? Open in Web Editor NEWCookie setting/parsing middleware for the Iron framework.
License: MIT License
Cookie setting/parsing middleware for the Iron framework.
License: MIT License
Alloy moved to Request::alloy
Request::url is now a Url struct from https://github.com/servo/rust-url
Moved entirely to Cargo, other PR should pass at some point.
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.
I've started working on getting this crate compiling on the current nightly version.
You can see this work here: https://github.com/andrewbrinker/cookie/tree/refactor/compile-on-nightly
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.