Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Stricter comparison when replacing URL for LocalAdapter #17097

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

fgilio
Copy link
Contributor

@fgilio fgilio commented Jan 3, 2017

I have a rare case with a directory name that starts with string public, like this:

  • /storage/app/public/public.../files

So this was triggering the ternary on line 298 and the resulting URL was broken.
Here is a real example:

  • Upload public path for LocalAdapter is publicala/logo.svg, full path from project root being /storage/app/public/publicala/logo.svg.
  • Generated URL was https://laravelapp.dev/storageala/logo.svg
    With this litle patch the generated URL is https://laravelapp.dev/storage/publicala/logo.svg

This would also be useful for directory names ending with string public

I have an edgy case with a directory name that starts with string `public`, like this:
- `/storage/app/public/public.../files`

So this was triggering the ternary on line `298` and the resulting URL was broken.
Here is a real example:
- Upload public path for LocalAdapter is `publicala/logo.svg`, full path from project root being `/storage/app/public/publicala/logo.svg`.
- Generated URL was `https://laravelapp.dev/storageala/logo.svg`
With this litle patch the generated URL is `https://laravelapp.dev/storage/publicala/logo.svg`

This would also be useful for directory names ending with string `public`
@taylorotwell taylorotwell merged commit b1a951b into laravel:5.3 Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants