From c08798aab49b5fafcb42feff0ded1a7ebb680283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Brattberg?= Date: Sun, 11 Aug 2019 17:34:02 +0200 Subject: [PATCH] If no realm is reported, default to empty string. --- package.json | 2 +- src/HTTPDigestAuth.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0907715..19e5464 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Paw-DigestAuthDynamicValue", - "version": "2.0.0", + "version": "2.0.1", "main": "src/DigestAuthDynamicValue.js", "license": "MIT", "homepage": "https://github.com/luckymarmot/Paw-DigestAuthDynamicValue", diff --git a/src/HTTPDigestAuth.js b/src/HTTPDigestAuth.js index ef1bcc2..ab87353 100644 --- a/src/HTTPDigestAuth.js +++ b/src/HTTPDigestAuth.js @@ -114,7 +114,7 @@ export default class HTTPDigestAuth { const method = this.method const url = this.url - const realm = this.chal['realm'] + const realm = this.chal['realm'] ? this.chal['realm'] : '' const nonce = this.chal['nonce'] const qop = this.chal['qop'] const algorithm = this.chal['algorithm']