Commit b70dbb92 authored by Patrick Dowler's avatar Patrick Dowler
Browse files

fix default daysValid value to avoid NPE

parent a6d66f76
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -148,8 +148,8 @@ public abstract class DelegationAction implements
                    "Delegation failed because caller autheticated with multiple certificates.");
        }

        
        
        if (this.daysValid == null)
            this.daysValid = 30.0f; // was default in ProxyCertServlet
            
        // check if it's a trusted client
        boolean authorized = false;
@@ -157,9 +157,7 @@ public abstract class DelegationAction implements
        if (name == null || AuthenticationUtil.equals(name, caller))
        {
            authorized = true;
            if (this.daysValid == null)
                this.daysValid = 30.0f; // was default in ProxyCertServlet
            else if (daysValid > 30.0)
            if (daysValid > 30.0)
                throw new ResourceNotFoundException("Requested lifetime limitted to 30");
        }
        else