diff --git a/jspwiki-main/src/main/java/org/apache/wiki/auth/login/CookieAuthenticationLoginModule.java b/jspwiki-main/src/main/java/org/apache/wiki/auth/login/CookieAuthenticationLoginModule.java index 1d98e66cbd..12edf886e0 100644 --- a/jspwiki-main/src/main/java/org/apache/wiki/auth/login/CookieAuthenticationLoginModule.java +++ b/jspwiki-main/src/main/java/org/apache/wiki/auth/login/CookieAuthenticationLoginModule.java @@ -178,7 +178,7 @@ private static File getCookieFile( final Engine engine, final String uid ) { // Find the cookie file final File file = new File( cookieDir, uid ); try { - if( file.getCanonicalPath().startsWith( cookieDir.getCanonicalPath() ) ) { + if( file.getCanonicalFile().toPath().startsWith(cookieDir.getCanonicalFile().toPath()) ) { return file; } } catch( final IOException e ) {