Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Fixed a NullPointerException case on Digest authentication.
lucciomanaa55d71cf53c
diff --git a/source/net/yacy/http/YaCyLegacyCredential.java b/source/net/yacy/http/YaCyLegacyCredential.javaindex 5deb9accd..13c217002 100644--- a/source/net/yacy/http/YaCyLegacyCredential.java+++ b/source/net/yacy/http/YaCyLegacyCredential.java@@ -65,8 +65,11 @@ public class YaCyLegacyCredential extends Credential {public boolean check(Object credentials) {if (credentials instanceof Credential) { // for DIGEST auth- return ((Credential) credentials).check(c);-+ if(this.c == null) {+ /* credential may be null after switching from BASIC to DIGEST authentication without re-encoding the password */+ return false;+ }+ return ((Credential) credentials).check(this.c);}if (credentials instanceof String) { // for BASIC authfinal String pw = (String) credentials;