Fixed #11014 - Removed double escaping on custom fields

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-05-13 05:45:00 -07:00
parent b36bfad0ca
commit 6fc222a648

View file

@ -168,9 +168,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') { if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) { if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) { if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e(implode(', ', $request->input($field->convertUnicodeDbSlug())))); $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
} else { } else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e($request->input($field->convertUnicodeDbSlug()))); $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
} }
} }
} else { } else {
@ -344,9 +344,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') { if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) { if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) { if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e(implode(', ', $request->input($field->convertUnicodeDbSlug())))); $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
} else { } else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e($request->input($field->convertUnicodeDbSlug()))); $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
} }
} }
} else { } else {