[MXS-3824] Allow symbolic link for path to directory /usr/share/maxscale/gui Created: 2021-10-21 Updated: 2022-01-13 Resolved: 2021-10-25 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | REST-API |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.17, 6.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Edward Stoever | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have offered the variable:
Customer wants to use a symbolic link. Here is an example of what happens when using a symbolic link and no value for sharedir:
|
| Comments |
| Comment by markus makela [ 2021-10-22 ] |
|
Did you use the literal value sharedir=/some/other/directory/? If so, it's looking for the files in /some/other/directory/gui/ instead of where you expect it to look. Based on the fact that it's a symbolic link, I don't think you even need to add that parameter for it to work. An additional detail is that if you're using a default REST API configuration then you must provide credentials to curl for it to work: curl -u admin:mariadb http://192.168.20.208:8989. |
| Comment by markus makela [ 2021-10-22 ] |
|
OK, I think I misunderstood what the actual problem was: there's a security check in the REST API that makes sure only files from the GUI directory are served. If the real path to the file being requested differs from the configured value of sharedir, the request would be rejected and the GUI would not load. I think we can change this so that it only requires the file to reside inside the configured sharedir after all symbolic links have been resolved. |
| Comment by Edward Stoever [ 2021-10-25 ] |
|
Thank you Markus! |