Use stripos instead of strpos(strtolower(), 'something')

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/8059/head
Morris Jobke 8 years ago
parent b9bbb894f8
commit 464f024fa9
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
  1. 2
      apps/encryption/lib/Crypto/Crypt.php
  2. 2
      apps/workflowengine/lib/Controller/RequestTime.php

@ -560,7 +560,7 @@ class Crypt {
$signaturePosition = strpos($meta, '00sig00');
// enforce signature for the new 'CTR' ciphers
if ($signaturePosition === false && strpos(strtolower($cipher), 'ctr') !== false) {
if ($signaturePosition === false && stripos($cipher, 'ctr') !== false) {
throw new GenericEncryptionException('Missing Signature', $this->l->t('Missing Signature'));
}

@ -37,7 +37,7 @@ class RequestTime extends Controller {
if ($search !== '') {
$timezones = array_filter($timezones, function ($timezone) use ($search) {
return strpos(strtolower($timezone), strtolower($search)) !== false;
return stripos($timezone, $search) !== false;
});
}

Loading…
Cancel
Save