From a0c3970d651db932537632b7f067e7e58edc2ce0 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Tue, 18 Sep 2007 23:18:09 +0000 Subject: [PATCH] Merged V2.1 to HEAD 6817: Fix for a resource bundle isue with regen renditions wizard and snapshot labels. 6809: Fixes for locking and permission related issues relating to forms. 6808: Uunit test update 6799: AR-1760: Office webscript : property is undefined when opening a document 6799: WCM submit dialog now sets focus to first field (label) rather than second (comment) 6795: Fix to line break encoder. 6781: WebDAV auth to return HTTP 401 instead of exception when user is null 6775: Fix for appserver shutdown hang 6761: Using avmService instead of nodeService to avoid a permission error MIT is seeing. 6742: Fix for MIT locking issue for content contributors 6706: Fixes to make wizard pages work in standards compliant mode. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6823 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../webdav/auth/AuthenticationFilter.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/source/java/org/alfresco/repo/webdav/auth/AuthenticationFilter.java b/source/java/org/alfresco/repo/webdav/auth/AuthenticationFilter.java index 7d05e670b0..b9c8c279ac 100644 --- a/source/java/org/alfresco/repo/webdav/auth/AuthenticationFilter.java +++ b/source/java/org/alfresco/repo/webdav/auth/AuthenticationFilter.java @@ -276,13 +276,25 @@ public class AuthenticationFilter implements Filter } else { - // Setup the authentication context + try + { + // Setup the authentication context + m_authService.validate(user.getTicket()); - m_authService.validate(user.getTicket()); + // Set the current locale - // Set the current locale - - // I18NUtil.setLocale(Application.getLanguage(httpRequest.getSession())); + // I18NUtil.setLocale(Application.getLanguage(httpRequest.getSession())); + } + catch (Exception ex) + { + // No user/ticket, force the client to prompt for logon details + + httpResp.setHeader("WWW-Authenticate", "BASIC realm=\"Alfresco DAV Server\""); + httpResp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + + httpResp.flushBuffer(); + return; + } } // Chain other filters