This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new b0c8459c22 qop is required in RFC 7616
b0c8459c22 is described below
commit b0c8459c22b4c07b4ac62644ad08e15f367f8304
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 30 16:55:31 2026 +0100
qop is required in RFC 7616
---
.../apache/tomcat/websocket/DigestAuthenticator.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/java/org/apache/tomcat/websocket/DigestAuthenticator.java
b/java/org/apache/tomcat/websocket/DigestAuthenticator.java
index 9bf5642c83..606b340c57 100644
--- a/java/org/apache/tomcat/websocket/DigestAuthenticator.java
+++ b/java/org/apache/tomcat/websocket/DigestAuthenticator.java
@@ -65,21 +65,17 @@ public class DigestAuthenticator extends Authenticator {
String messageQop = parameterMap.get("qop");
String algorithm = parameterMap.get("algorithm") == null ? "MD5" :
parameterMap.get("algorithm");
String opaque = parameterMap.get("opaque");
-
- StringBuilder challenge = new StringBuilder();
-
- if (messageQop != null && !messageQop.isEmpty()) {
- if (cnonceGenerator == null) {
- synchronized (cnonceGeneratorLock) {
- if (cnonceGenerator == null) {
- cnonceGenerator = new SecureRandom();
- }
+ if (cnonceGenerator == null) {
+ synchronized (cnonceGeneratorLock) {
+ if (cnonceGenerator == null) {
+ cnonceGenerator = new SecureRandom();
}
}
-
- cNonce = cnonceGenerator.nextLong();
- nonceCount++;
}
+ cNonce = cnonceGenerator.nextLong();
+ nonceCount++;
+
+ StringBuilder challenge = new StringBuilder();
challenge.append("Digest ");
challenge.append("username=\"").append(userName).append("\",");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]