Skip to content

Commit dbb9cb7

Browse files
committed
Move session.cookie_path variable for Roundcube to Nginx config
This preserves the security of the default configuration while allowing greater flexibility for advanced configurations
1 parent 3efd425 commit dbb9cb7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

conf/nginx-alldomains.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
fastcgi_split_path_info ^/mail(/.*)()$;
4343
fastcgi_index index.php;
4444
fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
45+
# ensure roudcube session id's aren't leaked to other parts of the server
46+
fastcgi_param PHP_VALUE "session.cookie_path=/mail/";
4547
fastcgi_pass php-fpm;
4648

4749
# Outgoing mail also goes through this endpoint, so increase the maximum

setup/webmail.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ cat > $RCM_CONFIG <<EOF;
141141
\$config['login_username_filter'] = 'email';
142142
\$config['password_charset'] = 'UTF-8';
143143
\$config['junk_mbox'] = 'Spam';
144-
/* ensure roudcube session id's aren't leaked to other parts of the server */
145-
\$config['session_path'] = '/mail/';
146144
/* prevent CSRF, requires php 7.3+ */
147145
\$config['session_samesite'] = 'Strict';
148146
\$config['quota_zero_as_unlimited'] = true;

0 commit comments

Comments
 (0)