roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.63k stars 1.61k forks source link

Invalid request! No data was saved #9522

Open Khnaz35 opened 4 days ago

Khnaz35 commented 4 days ago

Prerequisites

Describe the issue

I am experiencing an "Invalid request! No data was saved." error when attempting to log in to Roundcube. Below are the details of my setup and the steps I have taken to troubleshoot the issue.

What browser(s) are you seeing the problem on?

Chrome

What version of PHP are you using?

php -v PHP 8.1.29 (cli) (built: Jun 5 2024 05:51:57) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.1.29, Copyright (c) Zend Technologies with Zend OPcache v8.1.29, Copyright (c), by Zend Technologies

What version of Roundcube are you using?

1.6.7

JavaScript errors

POST https://example.com:2096/?_task=login 401 (Unauthorized)

PHP errors

172.70.143.130 - - [27/Jun/2024:20:53:25 +0800] "GET / HTTP/1.1" 200 5434 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.33 - - [27/Jun/2024:20:53:25 +0800] "GET /plugins/jqueryui/themes/elastic/jquery-ui.min.css?s=1718985431 HTTP/1.1" 200 29309 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.244 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/styles/styles.min.css?s=1718985431 HTTP/1.1" 200 120302 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.142.62 - - [27/Jun/2024:20:53:25 +0800] "GET /program/js/jquery.min.js?s=1718985431 HTTP/1.1" 200 90926 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.142.150 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/deps/bootstrap.min.css?s=1718985431 HTTP/1.1" 200 160347 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.69.166.123 - - [27/Jun/2024:20:53:25 +0800] "GET /program/js/app.min.js?s=1718985431 HTTP/1.1" 200 171657 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.69.166.114 - - [27/Jun/2024:20:53:25 +0800] "GET /program/js/jstz.min.js?s=1718985431 HTTP/1.1" 200 13835 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.69.166.47 - - [27/Jun/2024:20:53:25 +0800] "GET /plugins/jqueryui/js/jquery-ui.min.js?s=1718985431 HTTP/1.1" 200 262502 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.142.119 - - [27/Jun/2024:20:53:25 +0800] "GET /plugins/jqueryui/js/i18n/datepicker-en-GB.js?s=1718985431 HTTP/1.1" 200 1203 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.38 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/deps/bootstrap.bundle.min.js?s=1718985431 HTTP/1.1" 200 84104 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.152.69 - - [27/Jun/2024:20:53:25 +0800] "GET /program/js/common.min.js?s=1718985431 HTTP/1.1" 200 12757 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.142.28 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/images/logo.svg?s=1718985431 HTTP/1.1" 200 888 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.147.188 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/ui.min.js?s=1718985431 HTTP/1.1" 200 61335 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.92.151 - - [27/Jun/2024:20:53:25 +0800] "GET /skins/elastic/fonts/roboto-v29-regular.woff2 HTTP/1.1" 200 50240 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.147.53 - - [27/Jun/2024:20:53:26 +0800] "GET /skins/elastic/fonts/fa-solid-900.woff2 HTTP/1.1" 200 75440 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.93.39 - - [27/Jun/2024:20:53:26 +0800] "GET /skins/elastic/images/favicon.ico?s=1718985431 HTTP/1.1" 200 16958 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.92.148 - - [27/Jun/2024:20:53:52 +0800] "POST /?_task=login HTTP/1.1" 401 5541 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.31 - - [27/Jun/2024:20:57:50 +0800] "GET / HTTP/1.1" 200 5434 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.107.25 - - [27/Jun/2024:20:57:50 +0800] "GET /catalog/view/theme/journal3/icons/fonts/icomoon.woff2?v=762176a4d7 HTTP/1.1" 200 5526 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.20 - - [27/Jun/2024:20:57:50 +0800] "GET /catalog/view/theme/journal3/assets/af9fd4fb35c9ad25508cbfe436891677.css?v=f89a43e7 HTTP/1.1" 200 5514 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.209 - - [27/Jun/2024:20:57:50 +0800] "GET /program/js/jquery.min.js?s=1718985431 HTTP/1.1" 200 90926 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.107.70 - - [27/Jun/2024:20:57:50 +0800] "GET /program/js/common.min.js?s=1718985431 HTTP/1.1" 200 12757 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.209 - - [27/Jun/2024:20:57:50 +0800] "GET /skins/elastic/images/logo.svg?s=1718985431 HTTP/1.1" 200 888 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.96 - - [27/Jun/2024:20:57:50 +0800] "GET /skins/elastic/deps/bootstrap.min.css?s=1718985431 HTTP/1.1" 200 160347 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.107.67 - - [27/Jun/2024:20:57:50 +0800] "GET /plugins/jqueryui/themes/elastic/jquery-ui.min.css?s=1718985431 HTTP/1.1" 200 29309 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.148 - - [27/Jun/2024:20:57:50 +0800] "GET /skins/elastic/styles/styles.min.css?s=1718985431 HTTP/1.1" 200 120302 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.107.47 - - [27/Jun/2024:20:57:50 +0800] "GET /program/js/jstz.min.js?s=1718985431 HTTP/1.1" 200 13835 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.76 - - [27/Jun/2024:20:57:50 +0800] "GET /skins/elastic/deps/bootstrap.bundle.min.js?s=1718985431 HTTP/1.1" 200 84104 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.31 - - [27/Jun/2024:20:57:50 +0800] "GET /program/js/app.min.js?s=1718985431 HTTP/1.1" 200 171657 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.107.86 - - [27/Jun/2024:20:57:50 +0800] "GET /plugins/jqueryui/js/i18n/datepicker-en-GB.js?s=1718985431 HTTP/1.1" 200 1203 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 162.158.106.195 - - [27/Jun/2024:20:57:50 +0800] "GET /plugins/jqueryui/js/jquery-ui.min.js?s=1718985431 HTTP/1.1" 200 262502 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.201 - - [27/Jun/2024:20:57:50 +0800] "GET /skins/elastic/ui.min.js?s=1718985431 HTTP/1.1" 200 61335 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.44 - - [27/Jun/2024:20:57:51 +0800] "GET /skins/elastic/fonts/roboto-v29-regular.woff2 HTTP/1.1" 200 50240 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.145 - - [27/Jun/2024:20:57:51 +0800] "GET /skins/elastic/fonts/fa-solid-900.woff2 HTTP/1.1" 200 75440 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.68.242.118 - - [27/Jun/2024:20:57:51 +0800] "GET /skins/elastic/images/favicon.ico?s=1718985431 HTTP/1.1" 200 16958 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.75 - - [27/Jun/2024:20:59:19 +0800] "GET / HTTP/1.1" 200 5434 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.36 - - [27/Jun/2024:20:59:19 +0800] "GET /catalog/view/theme/journal3/icons/fonts/icomoon.woff2?v=762176a4d7 HTTP/1.1" 200 5526 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.68.242.40 - - [27/Jun/2024:20:59:19 +0800] "GET /catalog/view/theme/journal3/assets/af9fd4fb35c9ad25508cbfe436891677.css?v=f89a43e7 HTTP/1.1" 200 5514 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.68.242.12 - - [27/Jun/2024:20:59:19 +0800] "GET /plugins/jqueryui/themes/elastic/jquery-ui.min.css?s=1718985431 HTTP/1.1" 200 29309 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.28 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/images/logo.svg?s=1718985431 HTTP/1.1" 200 888 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.29 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/deps/bootstrap.min.css?s=1718985431 HTTP/1.1" 200 160347 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.25 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/styles/styles.min.css?s=1718985431 HTTP/1.1" 200 120302 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.68.242.13 - - [27/Jun/2024:20:59:19 +0800] "GET /plugins/jqueryui/js/i18n/datepicker-en-GB.js?s=1718985431 HTTP/1.1" 200 1203 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.156 - - [27/Jun/2024:20:59:19 +0800] "GET /program/js/jquery.min.js?s=1718985431 HTTP/1.1" 200 90926 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.40 - - [27/Jun/2024:20:59:19 +0800] "GET /program/js/jstz.min.js?s=1718985431 HTTP/1.1" 200 13835 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.100 - - [27/Jun/2024:20:59:19 +0800] "GET /program/js/common.min.js?s=1718985431 HTTP/1.1" 200 12757 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.82.55 - - [27/Jun/2024:20:59:19 +0800] "GET /program/js/app.min.js?s=1718985431 HTTP/1.1" 200 171657 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.161 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/deps/bootstrap.bundle.min.js?s=1718985431 HTTP/1.1" 200 84104 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.71.81.42 - - [27/Jun/2024:20:59:19 +0800] "GET /plugins/jqueryui/js/jquery-ui.min.js?s=1718985431 HTTP/1.1" 200 262502 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.69.166.23 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/ui.min.js?s=1718985431 HTTP/1.1" 200 61335 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.142.141 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/fonts/roboto-v29-regular.woff2 HTTP/1.1" 200 50240 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.28 - - [27/Jun/2024:20:59:19 +0800] "GET /skins/elastic/fonts/fa-solid-900.woff2 HTTP/1.1" 200 75440 "https://example.com:2096/skins/elastic/styles/styles.min.css?s=1718985431" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.196 - - [27/Jun/2024:20:59:20 +0800] "GET /skins/elastic/images/favicon.ico?s=1718985431 HTTP/1.1" 200 16958 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 172.70.143.249 - - [27/Jun/2024:20:59:28 +0800] "POST /?_task=login HTTP/1.1" 401 5541 "https://example.com:2096/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"

Khnaz35 commented 4 days ago

I have also tried to test the access to /tmp like

$file = '/tmp/test_roundcube.txt';
$content = 'This is a test file for Roundcube.';

if (file_put_contents($file, $content) !== false) {
    echo "File created successfully: $file";
} else {
    echo "Failed to create file: $file";
}
?>

And the saving the file with the name test_write.php when i access the website https://example.com:2096/test-write.php i can see that file is created successfully which confirms that /tmp is accessable and writeable.

pabzm commented 3 days ago

This looks to me like the authentication simply fails, so your username or password is maybe wrong?

You can try to set some of the logging-related config options (including imap_debug) and look for additional hints: https://github.com/roundcube/roundcubemail/blob/571950308cf6aa57cad0d30b52401961a23eb53d/config/defaults.inc.php#L70-L111

alecpl commented 3 days ago

This error has nothing to do with authentication. More likely something's wrong with how HTTP request is handled e.g. regarding cookies (http server doing something wrong), or maybe something's wrong with session storage.

pabzm commented 8 hours ago

@alecpl Not to question your knowledge, only to learn: the string that includes "No data was saved" is used exclusively in this line: https://github.com/roundcube/roundcubemail/blob/571950308cf6aa57cad0d30b52401961a23eb53d/index.php#L165

It comes into play if the authentication failed: https://github.com/roundcube/roundcubemail/blob/571950308cf6aa57cad0d30b52401961a23eb53d/index.php#L156-L157 What makes you sure that the invalid authentication isn't due to invalid credentials?

alecpl commented 8 hours ago

Look how 'valid' initial state is set in line 101. Of course, some authentication plugin could use the valid flag too, but I think that would be use against it's purpose.

Khnaz35 commented 8 hours ago

Thanks for replying guys. I will make few more test and will let you know if there is any positive move.