-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
assets return 403 with 3.7.1 #1143
Comments
That would be related to this change: 4af70d3 What operating system are you on? |
Windows 11 with Xampp |
The change we made uses The function also returns I tested how |
realpath("{$allowedRoot}/{$path}") ----> C:\xampp\htdocs\avata\storage\tenantleon\app\public\logo.svg |
Ah, so it seems that the |
If you want, you can test if making this change would fix the problem for you: - startsWith($allowedRoot))
+ startsWith(realpath($allowedRoot))) |
Works. |
I have the same issue and that change fixes it. |
Any ETA on when this fix will be pushed? Should I make a pull request? @stancl |
Just to confirm — is everyone who's experiencing this on Windows? |
Yes, with the exact same issue because of the different slashes /, \ |
Cool, thanks for the feedback here. Working on a refactor that implements this in a better way. |
Fixed in v3.7.2 |
Bug description
Tenancy assets return 403.
This code:
<img src="{{ asset('logo.svg') }}" height="37" />
Works with 3.7, and with 2.7.1 return 403 Forbidden.
With favicon same issue:
Return 403.Steps to reproduce
Blade code:
<img src="{{ asset('logo.svg') }}" height="37" />
Direct url:
http://localhost.test/tenancy/assets/logo.svg
Image dir:
storage\tenantleon\app\public
Expected behavior
Show assets.
Laravel version
8.2
stancl/tenancy version
3.7.1
The text was updated successfully, but these errors were encountered: