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

Failure to request thumbnails properly when certain special characters are being used (ie, URL escaping is missing) #498

Closed
AndGem opened this issue Jun 8, 2022 · 3 comments
Labels
Milestone

Comments

@AndGem
Copy link
Contributor

AndGem commented Jun 8, 2022

Describe the bug

If a filename contains a question mark (?) pigallery2 will not be able to display the picture. For example if there are identical and valid jpg files main_page.jpg and main_page?.jpg then, the former will be shown correctly, while the latter will not be shown.

Photo/video (optional) that causes the bug

  • independent of picture

Screenshots (optional)

Bildschirmfoto 2022-06-08 um 21 32 38

^ illustration

Server logs (optional)

6/8/2022, 7:38:05 PM[VERBS] GET /api/gallery/content/test/main_page?.jpg/thumbnail/480 404 2ms

Note that requesting manually with %3F instead of ? works :

6/8/2022, 7:39:22 PM[VERBS] GET /api/gallery/content/test/main_page%3F.jpg/thumbnail/480 200 59ms

Environment (please complete the following information):

  • OS: linux server, Ubuntu 20.04
  • Browser macOS, Chrome

Used app version:
Using Docker, but I'm struggling to get the version out. It is the current latest. If you advice how to get the version number, I'll extract it. Until then, I found this in the logs:

[Typeconfig] Processing cli and ENV inputs: {
	"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
	"HOSTNAME": "2db19b8a737f",
	"NODE_ENV": "debug",
	"NODE_VERSION": "14.19.0",
	"YARN_VERSION": "1.22.17",
	"PI_DOCKER": true,
	"HOME": "/root",
	"VIPS_MIN_STACK_SIZE": "2m",
	"VIPSHOME": "/target"
}
@bpatrik bpatrik added the bug label Jun 13, 2022
bpatrik added a commit that referenced this issue Aug 20, 2022
…tion_mark

encoding of question mark character for media path - fixes issue #498
@daedric7
Copy link

daedric7 commented Nov 16, 2022

I still have this issue, with the " ? " char.

Searching through the logs, it seems that spaces are being converted correctly to %20 on the URL, but the ? remain as such. Manually correcting the url to convert ? to %3F fixes the URL.

Anyone else ?

@bpatrik
Copy link
Owner

bpatrik commented Dec 10, 2022

Is this still an issue with the latest nightly?
#521 seems to solve the issue.

@tilmanginzel
Copy link

@bpatrik Yep that fixed it, I have tested it with latest master branch. Thumbnail URLs for files with ? characters are encoded just fine for me.

@bpatrik bpatrik added this to the v1.9.5 milestone Dec 14, 2022
@bpatrik bpatrik closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants