Skip to content

Commit 612f92c

Browse files
Fixed translated slug query since SQL injection fix
1 parent 2c1aae2 commit 612f92c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HasSlug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public function resolveRouteBinding($value, $field = null)
256256

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

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

0 commit comments

Comments
 (0)