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

Config: Do not search empty template paths for files #2946

Closed
chrkau opened this issue Nov 28, 2022 · 4 comments
Closed

Config: Do not search empty template paths for files #2946

chrkau opened this issue Nov 28, 2022 · 4 comments
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@chrkau
Copy link

chrkau commented Nov 28, 2022

1. What is not working as documented?

If CustomTemplatesPath is not set it defaults to "". This is expanded by TemplateFiles to /[A-Za-z0-9]*.*" which means pretty much all files at / are considered templates. This in turn means that if there are any files at the root of the file system (of the container) the app won't start.

2. How can we reproduce it?

Steps to reproduce the behavior:

Create any file at the root of the file system (of the container) e.g. dd if=/dev/zero of=/foobar.bin bs=1k count=1.
Try to start the app and get an error about foobar.bin not being a valid template.

3. What behavior do you expect?

The app should start no matter what files there are at /.

4. What could be the cause of your problem?

See 1.

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

See 2.

6. Which software versions do you use?

Build 221125-e58fee0fb.

@chrkau chrkau added the bug Something isn't working label Nov 28, 2022
@lastzero
Copy link
Member

Thanks for reporting this!

@lastzero lastzero self-assigned this Nov 28, 2022
@lastzero lastzero changed the title TemplateFiles consideres files at / templates Config: Do not search empty template paths for files Nov 28, 2022
lastzero added a commit that referenced this issue Nov 28, 2022
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

Let us know if this works for you! I have also started a new preview build for testing. It will be ready within an hour.

@lastzero lastzero added the please-test Ready for acceptance test label Nov 28, 2022
@chrkau
Copy link
Author

chrkau commented Dec 2, 2022

Looking good from my side. Thanks a bunch.

@graciousgrey
Copy link
Member

Thanks for testing :)

@graciousgrey graciousgrey added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels Dec 2, 2022
@graciousgrey graciousgrey added released Available in the stable release and removed tested Changes have been tested successfully labels May 3, 2023
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
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants