You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 2, 2023. It is now read-only.
return$query->whereRaw('AES_DECRYPT('.$column.', "'.getenv('ENCRYPTION_KEY').'") NOT LIKE ? COLLATE utf8mb4_general_ci', [$value]);
242
+
return$query->whereRaw('AES_DECRYPT('.$column.', "'.getenv('ENCRYPTION_KEY').'") NOT LIKE '.DB::getPdo()->quote($value).' COLLATE utf8mb4_general_ci');
236
243
}
237
244
238
245
/**
@@ -246,7 +253,7 @@ public function scopeWhereNotEncrypted($query, $column, $value)
return$query->orWhereRaw('AES_DECRYPT('.$column.', "'.getenv('ENCRYPTION_KEY').'") NOT LIKE ? COLLATE utf8mb4_general_ci', [$value]);
270
+
return$query->orWhereRaw('AES_DECRYPT('.$column.', "'.getenv('ENCRYPTION_KEY').'") NOT LIKE '.DB::getPdo()->quote($value).' COLLATE utf8mb4_general_ci');
$items = DB::select("SELECT count(*) as aggregate FROM `".$parameters[0]."` WHERE AES_DECRYPT(`".$field."`, '".getenv("ENCRYPTION_KEY")."') LIKE ? COLLATE utf8mb4_general_ci".($ignore ? " AND id != ".$ignore : ''),
40
-
[$value]);
39
+
$items = DB::select("SELECT count(*) as aggregate FROM `".$parameters[0]."` WHERE AES_DECRYPT(`".$field."`, '".getenv("ENCRYPTION_KEY")."') LIKE '".DB::getPdo()->quote($value)."' COLLATE utf8mb4_general_ci".($ignore ? " AND id != ".$ignore : ''));
41
40
42
41
return$items[0]->aggregate === 0;
43
42
});
@@ -52,8 +51,7 @@ private function addValidators(): void
$items = DB::select("SELECT count(*) as aggregate FROM `".$parameters[0]."` WHERE AES_DECRYPT(`".$field."`, '".getenv("ENCRYPTION_KEY")."') LIKE ? COLLATE utf8mb4_general_ci",
56
-
[$value]);
54
+
$items = DB::select("SELECT count(*) as aggregate FROM `".$parameters[0]."` WHERE AES_DECRYPT(`".$field."`, '".getenv("ENCRYPTION_KEY")."') LIKE '".DB::getPdo()->quote($value)."' COLLATE utf8mb4_general_ci");
0 commit comments