digest auth bug: wrong calculation for A1

Open
#116 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
ruby

Research direction

Start at lib/webrick/httpauth/digestauth.rb around line 229 and compare the A1 calculation with section 3.4.2 of RFC 7616. Done means the calculation uses the username, realm, password, nonce, and cnonce as specified by the RFC.

Written by the indexing model from the issue text.

Description

From the RFC:

It uses the server nonce from that challenge, herein called
nonce-prime, and the client nonce value from the response, herein
called cnonce-prime, to construct A1 as follows:

    A1       = H( unq(username) ":" unq(realm) ":" passwd )
                   ":" unq(nonce-prime) ":" unq(cnonce-prime)

this is not applied here, which is not using the usernamme and realm in the construction of the A1 value.

Dominant language
Ruby
Stars
328
Forks
114
Avg merge
1h 15m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/webrick

All issues in ruby/webrick

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.