Skip to content

Commit

Permalink
remove dots
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 15, 2020
1 parent cac4a74 commit a0094a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public function getLocale()
*/
public function setLocale($locale)
{
if (Str::contains($locale, ['.', '/', '\\'])) {

This comment has been minimized.

Copy link
@RoodFruit

RoodFruit Apr 15, 2020

@taylorotwell
If you would like to keep the dots, you could use:

if (Str::contains($locale, ['/', '\\']) || Str::is(['.', '..'], $locale)) {

Thanks for the quick fix btw. When is the next update planned?

This comment has been minimized.

Copy link
@mpyw

mpyw Apr 15, 2020

Contributor

I agree with this

if (Str::contains($locale, ['/', '\\'])) {
throw new InvalidArgumentException('Invalid characters present in locale.');
}

Expand Down

0 comments on commit a0094a5

Please sign in to comment.