mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
ALF-11817: removed change since it breaks tests and essentially duplicates code a few lines above.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@38650 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -90,33 +90,6 @@ public class UnlockMethod extends WebDAVMethod
|
|||||||
logger.warn("Failed to parse If header: " + strLockTokenHeader);
|
logger.warn("Failed to parse If header: " + strLockTokenHeader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ALF-11817 If the header Lock-Token is incorrect (without < and >).
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Build the lock token.
|
|
||||||
FileInfo lockNodeInfo = null;
|
|
||||||
String userName = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
userName = getDAVHelper().getAuthenticationService().getCurrentUserName();
|
|
||||||
lockNodeInfo = getNodeForPath(getRootNodeRef(), getPath(), getServletPath());
|
|
||||||
}
|
|
||||||
catch (AuthenticationException ex)
|
|
||||||
{
|
|
||||||
throw new WebDAVServerException(HttpServletResponse.SC_UNAUTHORIZED);
|
|
||||||
}
|
|
||||||
catch (FileNotFoundException e)
|
|
||||||
{
|
|
||||||
throw new WebDAVServerException(HttpServletResponse.SC_NOT_FOUND);
|
|
||||||
}
|
|
||||||
String buildLockToken = WebDAV.makeLockToken(lockNodeInfo.getNodeRef(), userName);
|
|
||||||
// End build.
|
|
||||||
|
|
||||||
if (strLockTokenHeader.equalsIgnoreCase(buildLockToken))
|
|
||||||
{
|
|
||||||
m_strLockToken = strLockTokenHeader;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// If there is no token this is a bad request so send an error back
|
// If there is no token this is a bad request so send an error back
|
||||||
if (m_strLockToken == null)
|
if (m_strLockToken == null)
|
||||||
|
Reference in New Issue
Block a user