Bug 32938 - Cleanup: XSSAuditor passes too many parameters to XSSAuditor::findInRequest
Summary: Cleanup: XSSAuditor passes too many parameters to XSSAuditor::findInRequest
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: XSSAuditor
Depends on:
Blocks:
 
Reported: 2009-12-25 11:52 PST by Daniel Bates
Modified: 2009-12-25 15:33 PST (History)
3 users (show)

See Also:


Attachments
Patch (12.28 KB, patch)
2009-12-25 11:55 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (12.28 KB, patch)
2009-12-25 12:02 PST, Daniel Bates
abarth: review+
abarth: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2009-12-25 11:52:49 PST
Extracted from the changes in the patch for bug #27895.

We should clean up the XSSAuditor so that we don't need to pass as many parameters around.

Currently, we pass various parameters through to XSSAuditor::findInRequest that are used to determine how to decode the HTTP input parameters so that we can perform a match against the script source.
Comment 1 Daniel Bates 2009-12-25 11:55:46 PST
Created attachment 45495 [details]
Patch

No functionality was changed. So, no new tests.
Comment 2 WebKit Review Bot 2009-12-25 11:59:48 PST
Attachment 45495 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/page/XSSAuditor.cpp:356:  One space before end of line comments  [whitespace/comments] [5]
WebCore/page/XSSAuditor.cpp:361:  One space before end of line comments  [whitespace/comments] [5]
Total errors found: 2
Comment 3 Daniel Bates 2009-12-25 12:02:52 PST
Created attachment 45496 [details]
Patch

Fix style-bot errors.
Comment 4 WebKit Review Bot 2009-12-25 12:05:10 PST
style-queue ran check-webkit-style on attachment 45496 [details] without any errors.
Comment 5 Adam Barth 2009-12-25 12:43:53 PST
Comment on attachment 45496 [details]
Patch

This looks great.  One nit:

 147     task.decodeEntities = true;

You don't need these assignments because decodeEntities defaults to true.  We needed them originally because the parameters were in a fixed order.

Other than that, looks great.  Thanks Dan.
Comment 6 Daniel Bates 2009-12-25 13:59:42 PST
Will remove before I land.

(In reply to comment #5)
> (From update of attachment 45496 [details])
> This looks great.  One nit:
> 
>  147     task.decodeEntities = true;
> 
> You don't need these assignments because decodeEntities defaults to true.  We
> needed them originally because the parameters were in a fixed order.
> 
> Other than that, looks great.  Thanks Dan.
Comment 7 Daniel Bates 2009-12-25 15:33:24 PST
Committed in <http://trac.webkit.org/changeset/52561>.