Skip to content

Commit

Permalink
Fixed translated slug query since SQL injection fix
Browse files Browse the repository at this point in the history
  • Loading branch information
toonvandenbos authored Apr 27, 2024
1 parent 2c1aae2 commit 612f92c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function resolveRouteBinding($value, $field = null)

// Get the models where this slug exists in other langs as well
$results = $this->getRouteBindingQueryBuilder()
->whereRaw('JSON_SEARCH(`?`, "one", "?")', [$key, $value])
->whereRaw('JSON_SEARCH(`'.$key.'`, "one", "?")', [$value])
->get();

// If we have zero or multiple results, don't guess
Expand Down

0 comments on commit 612f92c

Please sign in to comment.