Repository navigation
Apply the DigestOptions client.conf setting in _cupsSetDefaults - #206
Merged
michaelrsweet merged 1 commit intoNov 3, 2026
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_cupsSetDefaultsreadsclient.confinto a_cups_client_conf_tand then copies each setting into the per-thread globals, butdigestoptionsnever makes that trip, socg->digestoptionskeeps its zero value (None) no matter what the file says. The parser side is fine:cups_read_client_confand the macOS preferences path both turnDigestOptions DenyMD5intocc.digestoptions, and_httpSetDigestAuthStringcheckscg->digestoptionsbefore answering an MD5 Digest challenge. The result is that the documented knob for refusing MD5 Digest does nothing, so a server or an on-path attacker on a plainhttp:/ipp:connection can still sendWWW-Authenticate: Digest ... algorithm=MD5(or an RFC 2069 challenge) and collect the MD5 ofusername:realm:passwordfor offline cracking from a client whose admin opted out of it. I noticed it while reading the Digest code and confirmed it with a small harness: withDigestOptions DenyMD5in$CUPS_SERVERROOT/client.confthe unpatched library reportsdigestoptions0 and builds anAuthorization: Digest ... algorithm=MD5string for both the RFC 2617 and RFC 2069 forms; after the change both return false andDigestOptions Nonestill produces them. The copy is unconditional, likeuatokens, because there is no public setter that could have set it first. CUPS 2.xusersys.chas the same gap. The cups unit tests pass on macOS apart from the testjsoncupsJSONImportURLfetch of accounts.google.com, which fails on this machine for CA reasons unrelated to the change.Changelog:
- Fixed the "DigestOptions DenyMD5" setting in client.conf having no effect.