mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #4494] [MERGED] fix: process headers correctly in Digest Auth and other updates #4831
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4831
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4494
Author: @jamesgeorge007
Created: 10/30/2024
Status: ✅ Merged
Merged: 10/30/2024
Merged by: @jamesgeorge007
Base:
next← Head:fix/digest-auth📝 Commits (5)
a16f343fix: process headers correctly in Digest Auth8206482chore: ensure CLI fails with non-zero exit code when appropriatec9dbd64chore: remove the ability to disable retrying requests0803b9dchore: cleanup783383efix: include request body hash forauth-intqop📊 Changes
8 files changed (+105 additions, -85 deletions)
View changed files
📝
packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts(+17 -1)➖
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-coll.json(+0 -43)📝
packages/hoppscotch-cli/src/utils/auth/digest.ts(+31 -12)📝
packages/hoppscotch-cli/src/utils/pre-request.ts(+10 -8)📝
packages/hoppscotch-cli/src/utils/request.ts(+9 -3)📝
packages/hoppscotch-common/src/components/http/authorization/Digest.vue(+3 -2)📝
packages/hoppscotch-common/src/helpers/auth/digest.ts(+27 -14)📝
packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts(+8 -2)📄 Description
What's changed
This PR includes a couple of updates to how the resultant headers were computed for Digest Authorization, ensuring the request is transmitted in the expected format:
MD5-sess) while hashing username, realm and password.qopis set toauth-init. For content types likemultipart/form-datawhere the request body is not a string, it falls back to an empty string while hashing for now.Additionally, it includes the following changes:
www-authenticateheader received from the server in the initial response in a case-insensitive manner. Previously, if the server responded with theWWW-Authenticateheader, the initial response would be marked with an unexpected response sincewww-authenticatewas referred to straightaway.Disable Retrying Requestsfor the time being until a mechanism is in place to handle failed requests gracefully in such a case. CLI will still support this.Notes to reviewers
Ensure the request succeeds every time. Also, export the collection and run it via the CLI. Specify
disableRetry: truein the exported collection underauthfor the request and observe the request failing with a suitable message.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.