Closed Bug 1705659 Opened 4 years ago Closed 3 years ago

Rewrite authentication code with Tokenizer

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(12 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
  • Passes challenges as const nsACString&
  • Uses Tokenizer to parse input
  • Uses nsHttpDigestAuth::ParseChallenge instead of duplicating code
  • Sorts challenges by algorithm
  • Note: bits of code that use a FlatCString and raw char pointers are fixed
    in a following patch in this stack

Depends on D112594

Attachment #9216794 - Attachment description: WIP: Bug 1705659 - Modernize test_authentication.js r=#necko → Bug 1705659 - Modernize test_authentication.js r=#necko
  • The use of PromiseFlatCString is temporary. It is removed in the next patches in the stack.

Depends on D112911

Attachment #9216793 - Attachment description: WIP: Bug 1705659 - Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=#necko → Bug 1705659 - Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=#necko
Attachment #9216800 - Attachment description: WIP: Bug 1705659 - Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=#necko → Bug 1705659 - Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=#necko
Attachment #9216795 - Attachment description: WIP: Bug 1705659 - Make GetAuthenticator work with nsACString r=#necko → Bug 1705659 - Make GetAuthenticator work with nsACString r=#necko
Attachment #9216796 - Attachment description: WIP: Bug 1705659 - Make auth code use nsACString instead of raw char pointers r=#necko → Bug 1705659 - Make auth code use nsACString instead of raw char pointers r=#necko
Attachment #9216797 - Attachment description: WIP: Bug 1705659 - Use a nsTArray<CString> instead of custom linked list r=#necko → Bug 1705659 - Use a nsTArray<CString> instead of custom linked list r=#necko
Attachment #9216799 - Attachment description: WIP: Bug 1705659 - nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=#necko → Bug 1705659 - nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=#necko
Attachment #9216801 - Attachment description: WIP: Bug 1705659 - Avoid flatString in nsHttpNegotiateAuth::GenerateCredentials r=#necko → Bug 1705659 - Avoid flatString in nsHttpNegotiateAuth::GenerateCredentials r=#necko
Attachment #9216802 - Attachment description: WIP: Bug 1705659 - Make Host() and ProxyHost() return const nsCString& r=#necko → Bug 1705659 - Make Host() and ProxyHost() return const nsCString& r=#necko
Attachment #9216803 - Attachment description: WIP: Bug 1705659 - Static-analysis check auto fix for auth code r=#necko → Bug 1705659 - Static-analysis check auto fix for auth code r=#necko
Attachment #9216792 - Attachment description: WIP: Bug 1705659 - Use tokenizer in parseRealm r=#necko → Bug 1705659 - Use Tokenizer in ParseRealm r=#necko

Comment on attachment 9216792 [details]
Bug 1705659 - Use Tokenizer in ParseRealm r=#necko

Revision D112594 was moved to bug 669675. Setting attachment 9216792 [details] to obsolete.

Attachment #9216792 - Attachment is obsolete: true
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/05492b6578a9 Modernize test_authentication.js r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/eab68e8bea29 Make DigestLength a function r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/8af29f96ac77 Use nsACString& in ParseRealm and GetCredentialsForChallenge r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/36eff14cf2ea Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/3af362aa2b25 Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/18d3a604336a Make GetAuthenticator work with nsACString r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/4337214c8846 Make auth code use nsACString instead of raw char pointers r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/5c13ec25cc2e Use a nsTArray<CString> instead of custom linked list r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/c808bf01dfe8 nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/897868e22c81 Avoid flatString in nsHttpNegotiateAuth::GenerateCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/ff4348e0a307 Make Host() and ProxyHost() return const nsCString& r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/2aee05c2d6f3 Static-analysis check auto fix for auth code r=necko-reviewers,dragana

Backed out 14 changesets (Bug 1705659, Bug 472823, Bug 669675) for causing bustages in nsHttpChannelAuthProvider.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/a9431e068bcd2dc86778d9b12bc7775850e2736b
Push with failures, failure log.

(Update): Also caused mochitest plain failures.

Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b6b51bc167ac Modernize test_authentication.js r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/5449d9e08034 Make DigestLength a function r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/c977551bad6e Use nsACString& in ParseRealm and GetCredentialsForChallenge r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/2f0aacbd42b1 Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/0ea348abee78 Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/de990e6c944d Make GetAuthenticator work with nsACString r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/e688986c7011 Make auth code use nsACString instead of raw char pointers r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/a179695a56c9 Use a nsTArray<CString> instead of custom linked list r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/3c9556a8df55 nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/46e559f45338 Avoid flatString in nsHttpNegotiateAuth::GenerateCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/361c177ed131 Make Host() and ProxyHost() return const nsCString& r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/adad38c05584 Static-analysis check auto fix for auth code r=necko-reviewers,dragana
See Also: → 1712986
Regressions: 1713283

Backed out 14 changesets (Bug 1705659, Bug 472823, Bug 669675) as requested by valentin for causing regressions.
https://hg.mozilla.org/integration/autoland/rev/4207821cb4e016141be3c4b331f1ede47c90c0b7

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 90 Branch → ---
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/090b4ff09c66 Modernize test_authentication.js r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/76462198a0e3 Make DigestLength a function r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/94897e7cc6e8 Use nsACString& in ParseRealm and GetCredentialsForChallenge r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/d1d299ee9271 Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/3245e43a3ef8 Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/378d8f794bde Make GetAuthenticator work with nsACString r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/da10f609bb94 Make auth code use nsACString instead of raw char pointers r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/36f63a708615 Use a nsTArray<CString> instead of custom linked list r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/7c3b36a07eef nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/0b63e24e8d16 Avoid flatString in nsHttpNegotiateAuth::GenerateCredentials r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/2c981fa45bb8 Make Host() and ProxyHost() return const nsCString& r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/c0d6eff2103b Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Flags: needinfo?(valentin.gosu)
Blocks: 669675
Duplicate of this bug: 1436679
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: