Skip to content

Commit

Permalink
Fix Spaces in passwords are not handled correctly when adding servers…
Browse files Browse the repository at this point in the history
… issue
  • Loading branch information
Shadow243 committed Mar 5, 2024
1 parent d64699b commit 2509118
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion modules/core/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $.fn.serializeArray = function() {
parts = args[i].split('=');
res.push({'name': parts[0], 'value': parts[1]});
}
return res.map(function(x) {return {name: x.name, value: decodeURIComponent(x.value)}});
return res.map(function(x) {return {name: x.name, value: decodeURIComponent(x.value.replace(/\+/g, " "))}});
};
$.fn.sort = function(sort_function) {
var list = [];
Expand Down
2 changes: 0 additions & 2 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,6 @@ class Hm_Handler_imap_connect extends Hm_Handler_Module {
public function process() {
if (isset($this->request->post['imap_connect'])) {
list($success, $form) = $this->process_form(array('imap_user', 'imap_pass', 'imap_server_id'));

$sieve_enabled = false;
if ($this->module_is_supported('sievefilters') && $this->user_config->get('enable_sieve_filter_setting', true)) {
if (!isset($this->request->post['imap_sieve_host'])) {
Expand Down Expand Up @@ -1771,7 +1770,6 @@ public function process() {
$just_saved_credentials = false;
if (isset($this->request->post['imap_save'])) {
list($success, $form) = $this->process_form(array('imap_user', 'imap_pass', 'imap_server_id'));

if (isset($this->request->post['imap_sieve_host'])) {
try {
list($sieve_host, $sieve_port, $sieve_tls) = parse_sieve_config_host($this->request->post['imap_sieve_host']);
Expand Down

0 comments on commit 2509118

Please sign in to comment.