How to disable the 'Remember Me' feature in Confluence
Code Changes Required
This configuration requires changing the Confluence code in your installation. You will need to reapply these changes whenever you upgrade Confluence. Proceed with caution.
目的
The Confluence Administration Console does not provide an option for disabling the 'Remember Me' feature. If you like, you can vote for and comment on the request to provide this ability: CONF-10383.
As a workaround, you can modify the Velocity file login.vm
as described below. This modification simply removes the 'Remember Me' checkbox from the web page.
ソリューション
Confluence Single Node
The steps required are as follows:
- Confluence を停止します。
- Go to your Confluence installation directory
- Locate the
<CONFLUENCE-INSTALLATION>/confluence/login.vm
file and make a backup copy - Edit the file
Locate the following line of code:
#bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" "template='onofflist.vm'" "tabindex='4'") #end
Comment out the line so that it looks like this (note the extra '#' character in front):
##bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" "template='onofflist.vm'" "tabindex='4'") #end
Locate another, similar line of code:
#bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" "template='onofflist.vm'") #end
Comment out the line so that it looks like this:
##bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" "template='onofflist.vm'") #end
- Save the file and restart Confluence
- Repeat the above steps each time you install a new version of Confluence
Confluence Data Center
In Confluence Data Center, we enforce the Remember Me setting silently in order to account for inconsistencies in the session affinity between the nodes.
If you want to change the default behavior, you will need to change the default value for this variable. Here's how you can do it:
- Confluence を停止します。
- Go to Confluence installation directory
- Locate the
<CONFLUENCE-INSTALLATION>/confluence/login.vm
file and make a backup copy - Edit the file
Locate the following section of code:
#if ($action.shouldRememberMeCheckboxBeOmitted()) <input type="hidden" name="os_cookie" value="true"/> #else
Modify the above code as follows
#if ($action.shouldRememberMeCheckboxBeOmitted()) <input type="hidden" name="os_cookie" value="false"/> #else
Save the file and restart Confluence
Repeat the above steps each time you install a new version of Confluence
Verify the Fix
In order to verify if your changes were applied, you will need to do the following:
- Logout of your current session
- After you open Confluence and login, check your browser cookies
- You should NOT see any cookie with the name:
seraph.confluence