Closed Bug 1356193 Opened 8 years ago Closed 8 years ago

GetChannelResultPrincipal shouldn't call the result of GetSecurityMode securityFlags

Categories

(Core :: Security: CAPS, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

> nsSecurityFlags securityFlags = loadInfo->GetSecurityMode(); > // The data: inheritance flags should only apply to the initial load, > // not to loads that it might have redirected to. > if (loadInfo->RedirectChain().IsEmpty() && > (securityFlags == nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS || > securityFlags == nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS || > securityFlags == nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS)) { This code is confusing because flags (including the loadinfo flags) are normally combinatory, but the securitymode isn't - it will have only one of these flags. We should rename securityFlags to securityMode because that would make it less confusing.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Comment on attachment 8857886 [details] Bug 1356193 - rename securityFlags local variable for code clarity reasons, https://reviewboard.mozilla.org/r/129912/#review132482 thanks!
Attachment #8857886 - Flags: review?(ckerschb) → review+
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/419b0dc9e1a6 rename securityFlags local variable for code clarity reasons, r=ckerschb
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: