BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.49k stars 1.95k forks source link

Image replacement is case-sensitive when it should not be #5095

Closed DanielGordonIT closed 4 months ago

DanielGordonIT commented 4 months ago

Describe the Bug

When replacing an image in the image editor, if the case of the extension differs the replacement fails.

Steps to Reproduce

  1. Upload an image named "file.PNG"
  2. Attempt to replace the image with "newfile.png"
  3. Observe the error

Expected Behaviour

As png and PNG are not indicators of different files, you should be able to replace a file ending in PNG with one ending in png.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.02.2

DanielGordonIT commented 4 months ago

Pull request wrapping the relevant segments of code in strtolower() has been created