Skip to content

Csrf middleware - #43

Merged
grob merged 7 commits into
masterfrom
csrf
Apr 17, 2014
Merged

Csrf middleware#43
grob merged 7 commits into
masterfrom
csrf

Conversation

@oberhamsi

Copy link
Copy Markdown
Member

No description provided.

grob added 6 commits April 15, 2014 09:21
this implementation uses the "double submit cookies" pattern, but will likely be replaced by a better approach due to cookie insecurities.
…ookie

additionally replaced postParamName, queryParamName and headerName options with
an optional `getToken` function that receives the request as argument and is expected
to return the submitted csrf token.

moved csrf unit tests into own file and allow calling a single test method from commandline.
…go csrf middleware does

csrf throws errors now if requirements are not met
Comment thread lib/middleware/csrf.js Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getFailureResponse()?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

bail out of equals() if byte arrays differ in length (performance)
grob added a commit that referenced this pull request Apr 17, 2014
@grob
grob merged commit 70c8de3 into master Apr 17, 2014
@botic
botic deleted the csrf branch October 17, 2016 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants