forked from openSUSE/scanny
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change method names for sub-patterns
- Loading branch information
Showing
5 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ module Checks | |
# that are called and can mark dangerous string as safe for html. | ||
class XssMarkCheck < Check | ||
def pattern | ||
mark_as_check | ||
pattern_mark_as | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
LTe
Author
Owner
|
||
end | ||
|
||
def check(node) | ||
|
@@ -14,7 +14,7 @@ def check(node) | |
private | ||
|
||
#info CWE-000 (mark_as_xss_protected|mark_methods_as_xss_safe) | ||
def mark_as_check | ||
def pattern_mark_as | ||
<<-EOT | ||
Send< | ||
name = :mark_as_xss_protected | :mark_methods_as_xss_safe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Do you think it makes sense for the
pattern
method to delegate in situations like this (when there is only one call inside)? To me it actually seems a bit useless and I'd put the pattern into thepattern
method directly.