Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash with detect-no-csrf-before-method-override rule #6

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

mathieumg
Copy link
Contributor

@mathieumg mathieumg commented Jul 8, 2016

Fixed crash with detect-no-csrf-before-method-override rule.

It's possible to do

const app = express();

@jlamendo jlamendo merged commit c681aa7 into eslint-community:master Jul 8, 2016
@jlamendo
Copy link
Contributor

jlamendo commented Jul 8, 2016

Thanks @mathieumg - Merged.

@mathieumg mathieumg deleted the csrf-bug branch July 8, 2016 00:40
@mathieumg
Copy link
Contributor Author

Thanks! 😄 Are there any plans to publish in the near future? Last publication was 6 months ago. 😛

@priteshgupta
Copy link

Yes, this should be be published. On Node v6.2.2 I too am getting this error:

/Blah/node_modules/eslint-plugin-security/rules/detect-no-csrf-before-method-override.js:23
                if (node.callee.property.name === "methodOverride" && csrf) {
                                        ^

TypeError: Cannot read property 'name' of undefined
    at EventEmitter.CallExpression (/Blah/node_modules/eslint-plugin-security/rules/detect-no-csrf-before-method-override.js:23:41)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at NodeEventGenerator.enterNode (/Blah/node_modules/eslint/lib/util/node-event-generator.js:40:22)
    at CodePathAnalyzer.enterNode (/Blah/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23)
    at CommentEventGenerator.enterNode (/Blah/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
    at Controller.traverser.traverse.enter (/Blah/node_modules/eslint/lib/eslint.js:902:36)
    at Controller.__execute (/Blah/node_modules/estraverse/estraverse.js:397:31)
    at Controller.traverse (/Blah/node_modules/estraverse/estraverse.js:501:28)
    at Controller.Traverser.controller.traverse (/Blah/node_modules/eslint/lib/util/traverser.js:36:33)

@bonesoul
Copy link

this is also crashing eslint for me.

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.

None yet

5 participants