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

Library: Hash characters in folder names must be escaped #3695

Closed
isleshocky77 opened this issue Sep 1, 2023 · 2 comments
Closed

Library: Hash characters in folder names must be escaped #3695

isleshocky77 opened this issue Sep 1, 2023 · 2 comments
Assignees
Labels
bug Something isn't working released Available in the stable release tested Changes have been tested successfully

Comments

@isleshocky77
Copy link

1. What is not working as documented?

It appears that directories as folders under library originals are not being urlencoded properly.

2. How can we reproduce it?

Steps to reproduce the behavior:

  • Navigate to Library > Originals
  • Get a list of Directories in the Library
  • Click on the top-level directory
  • Get a list of the next level of folder (directories)
  • This level includes a folder (directory) named 1970-05 (Tray #005) to 3-78 Person-Abbrev Place
  • Click on that folder
  • End up at a page that says No pictures found

On this page the breadcrumbs seem to cut off at 970-05 (Tray leading me to believe it's not properly urlencoding the hash
The url is also something like the following: https://photoprism.example.org/library/index/files/johnsmith/1970-05/1970-05 %20(Tray%20#005)%20to%203-78%20Person-Abbrev%20Place

NOTE # is not encoded

3. What behavior do you expect?

I expect that if the originals includes a directory with a # that I'm able to navigate to that directory in the Web UI.

4. What could be the cause of your problem?

Bad urlencoding of the directory / folder name.

5. Can you provide us with example files for testing, error logs, or screenshots?

I believe the above should be enough.

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: Docker PhotoPrism® CE Build 230719-73fa7bbe8

(b) Database Type & Version: MariaDB 10.11

(c) Operating System Types & Versions: Linux

(d) Browser Types & Versions: Chrome 116.0.5845.110

(e) Ad Blockers, Browser Plugins, and/or Firewall Software? uBlock Origin

7. On what kind of device is PhotoPrism installed?

(a) Device / Processor Type: Custom Desktop Server

(b) Physical Memory & Swap Space in GB: 32GB

(c) Storage Type: HDD

(d) Anything else that might be helpful to know?

I attempted to just urlencode the #, but it still wouldn't pick up the images directory although it did update the breadcrumb correctly. Note, the directory listing shows a thumbnail of an image in that directory.

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

I have Apache as a proxy to an internal machine running traefik in docker going to the photoprism docker instances. Everything appears to be working correctly including SSL and Service Workers.

@isleshocky77 isleshocky77 added the bug Something isn't working label Sep 1, 2023
@lastzero lastzero self-assigned this Sep 3, 2023
@lastzero lastzero changed the title Link to folders / directories is not properly urlencoding the directory name Library: Hash characters in folder names must be explicitly escaped Sep 19, 2023
lastzero added a commit that referenced this issue Sep 19, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero changed the title Library: Hash characters in folder names must be explicitly escaped Library: # characters in path names must be explicitly escaped Sep 19, 2023
@lastzero lastzero changed the title Library: # characters in path names must be explicitly escaped Library: Hash characters in folder names must be escaped Sep 19, 2023
@lastzero
Copy link
Member

@isleshocky77 Thank you for reporting this! I've updated our development preview build so you can test my fixes:

@lastzero lastzero added the please-test Ready for acceptance test label Sep 19, 2023
lastzero added a commit that referenced this issue Sep 20, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Sep 20, 2023
On Unix-like OS, this is a placeholder for the user's home directory.

Signed-off-by: Michael Mayer <michael@photoprism.app>
@graciousgrey graciousgrey added tested Changes have been tested successfully released Available in the stable release and removed please-test Ready for acceptance test labels Sep 20, 2023
@isleshocky77
Copy link
Author

@lastzero Confirming this issue has now been resolved. Thank you for the quick fix and release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release tested Changes have been tested successfully
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants