Merge pull request #1247 from SergeyMosin/some-improvements

Some improvements
This commit is contained in:
the-djmaze 2023-10-01 11:13:55 +02:00 committed by GitHub
commit 4cc1e8429e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 64 additions and 14 deletions

View file

@ -679,16 +679,17 @@ class Actions
'contactsAllowed' => $this->AddressBookProvider($oAccount)->IsActive(),
'allowSpellcheck' => $oConfig->Get('defaults', 'allow_spellcheck', false),
'ViewHTML' => (bool) $oConfig->Get('defaults', 'view_html', true),
'ViewImages' => $oConfig->Get('defaults', 'view_images', 'ask'),
'ViewImagesWhitelist' => '',
'RemoveColors' => (bool) $oConfig->Get('defaults', 'remove_colors', false),
'AllowStyles' => false,
'ListInlineAttachments' => false,
'CollapseBlockquotes' => true,
'CollapseBlockquotes' => $oConfig->Get('defaults', 'collapse_blockquotes', true),
'MaxBlockquotesLevel' => 0,
'simpleAttachmentsList' => false,
'listGrouped' => false,
'listGrouped' => $oConfig->Get('defaults', 'mail_list_grouped', false),
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
'MsgDefaultAction' => (int) $oConfig->Get('defaults', 'msg_default_action', 1),
@ -773,7 +774,7 @@ class Actions
$aResult['requireTLS'] = (bool) $oSettings->GetConf('requireTLS', false);
$aResult['pgpSign'] = (bool) $oSettings->GetConf('pgpSign', false);
$aResult['pgpEncrypt'] = (bool) $oSettings->GetConf('pgpEncrypt', false);
$aResult['allowSpellcheck'] = (bool) $oSettings->GetConf('allowSpellcheck', false);
$aResult['allowSpellcheck'] = (bool) $oSettings->GetConf('allowSpellcheck', $aResult['allowSpellcheck']);
// $aResult['allowCtrlEnterOnCompose'] = (bool) $oSettings->GetConf('allowCtrlEnterOnCompose', true);
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);

View file

@ -139,7 +139,14 @@ trait UserAuth
$this->imapConnect($oAccount, true);
if ($bMainAccount) {
$bSignMe && $this->SetSignMeToken($oAccount);
if($bSignMe){
// SetAuthToken token needs to be called before SetSignMeToken
// because $_COOKIE['smctoken'] is used by Crypt::Passphrase.
// If the $_COOKIE['smctoken'] is not set then SetSignMeToken
// throws an exception
$this->SetAuthToken($oAccount);
$this->SetSignMeToken($oAccount);
}
$this->StorageProvider()->Put($oAccount, StorageType::SESSION, Utils::GetSessionToken(), 'true');
}

View file

@ -301,10 +301,13 @@ Values:
"match" - whitelist or ask
"always" - show always'),
'contacts_autosave' => array(true),
'mail_use_threads' => array(false),
'mail_list_grouped' => array(false),
'mail_use_threads' => array(false),
'allow_draft_autosave' => array(true),
'mail_reply_same_folder' => array(false),
'msg_default_action' => array(1, '1 - reply, 2 - reply all'),
'collapse_blockquotes' => array(true),
'allow_spellcheck' => array(false)
),
'logs' => array(

View file

@ -83,7 +83,7 @@ class Cookies
if ($cookie_remove) {
\header_remove('Set-Cookie');
foreach ($cookies as $cookie) {
\header($cookie);
\header($cookie,false);
}
}
@ -118,14 +118,14 @@ class Cookies
foreach (\str_split($sValue, $iMaxSize) as $i => $sPart) {
$sCookieName = $i ? "{$sName}~{$i}" : $sName;
Log::debug('COOKIE', "set {$sCookieName}");
static::_set($sCookieName, $sPart, $iExpire);
static::_set($sCookieName, $sPart, $iExpire, $httponly);
}
// Delete unused old 4K split cookie parts
foreach (\array_keys($_COOKIE) as $sCookieName) {
$aSplit = \explode('~', $sCookieName);
if (isset($aSplit[1]) && $aSplit[0] == $sName && $aSplit[1] > $i) {
Log::debug('COOKIE', "unset {$sCookieName}");
static::_set($sCookieName, '', 0);
static::_set($sCookieName, '', 0, $httponly);
}
}
}

View file

@ -254,6 +254,7 @@
"TITLE_UPDATE_IDENTITY": "Update Identity?",
"BUTTON_ADD_IDENTITY": "Add",
"BUTTON_UPDATE_IDENTITY": "Update",
"LABEL_SIGNATURE_ADD": "Add/Edit signature",
"LABEL_SIGNATURE_INSERT_BEFORE": "Insert this signature before quoted text in replies"
},
"POPUPS_CREATE_FOLDER": {

View file

@ -130,7 +130,7 @@
<tr>
<td data-i18n="GLOBAL/SUBJECT"></div>
<td>
<input type="text" name="subject" autocomplete="off" data-bind="textInput: subject">
<input type="text" name="subject" autocomplete="off" data-bind="textInput: subject, attr:{spellcheck:allowSpellcheck()?'true':'false'}">
</td>
</tr>
</table>

View file

@ -52,6 +52,7 @@
</div>
<hr>
<div class="control-group g-ui-user-select-none">
<h4 data-i18n="POPUPS_IDENTITY/LABEL_SIGNATURE_ADD"></h4>
<div data-bind="component: {
name: 'Checkbox',
params: {