Skip to content

Commit

Permalink
fix: xss #18
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy8 committed Feb 1, 2021
1 parent 4326425 commit 586be00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Repository/Admin/SensitiveWordRepository.php
Expand Up @@ -21,6 +21,7 @@ public static function list($perPage, $condition = [])
->orderBy('id', 'desc')
->paginate($perPage);
$data->transform(function ($item) {
xssFilter($item);
$item->editUrl = route('admin::SensitiveWord.edit', ['id' => $item->id]);
$item->deleteUrl = route('admin::SensitiveWord.delete', ['id' => $item->id]);
return $item;
Expand Down
1 change: 1 addition & 0 deletions app/Repository/Admin/UserRepository.php
Expand Up @@ -21,6 +21,7 @@ public static function list($perPage, $condition = [])
->orderBy('id', 'desc')
->paginate($perPage);
$data->transform(function ($item) {
xssFilter($item);
$item->editUrl = route('admin::user.edit', ['id' => $item->id]);
$item->deleteUrl = route('admin::user.delete', ['id' => $item->id]);
$item->statusText = $item->status == User::STATUS_ENABLE ?
Expand Down

0 comments on commit 586be00

Please sign in to comment.