Regenerating node_modules
This commit is contained in:
parent
09b4a82c83
commit
c96f84308a
5488 changed files with 487362 additions and 60779 deletions
25
node_modules/eslint-plugin-github/lib/rules/authenticity-token.js
generated
vendored
Normal file
25
node_modules/eslint-plugin-github/lib/rules/authenticity-token.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
docs: {},
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
function checkAuthenticityTokenUsage(node, str) {
|
||||
if (str.includes('authenticity_token')) {
|
||||
context.report(
|
||||
node,
|
||||
'Form CSRF tokens (authenticity tokens) should not be created in JavaScript and their values should not be used directly for XHR requests.'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
Literal(node) {
|
||||
if (typeof node.value === 'string') {
|
||||
checkAuthenticityTokenUsage(node, node.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue