[PR #5096] [MERGED] Wraps file extension comparison components in strtolower() #6449

Closed
opened 2026-02-05 10:32:33 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5096
Author: @DanielGordonIT
Created: 7/3/2024
Status: Merged
Merged: 7/14/2024
Merged by: @ssddanbrown

Base: developmentHead: normalize-file-extensions


📝 Commits (3)

  • 9b0ef85 Wraps file extension comparison components in strtolower()
  • 25f92ce Add test to verify different case on extensions works
  • ca31096 Actually add the test this time

📊 Changes

2 files changed (+28 additions, -1 deletions)

View changed files

📝 app/Uploads/ImageRepo.php (+1 -1)
📝 tests/Uploads/ImageTest.php (+27 -0)

📄 Description

Created to fix #5095
This avoids the issue where replacing file.PNG with newfile.png fails due to "PNG" not being equal to "png"


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/5096 **Author:** [@DanielGordonIT](https://github.com/DanielGordonIT) **Created:** 7/3/2024 **Status:** ✅ Merged **Merged:** 7/14/2024 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `normalize-file-extensions` --- ### 📝 Commits (3) - [`9b0ef85`](https://github.com/BookStackApp/BookStack/commit/9b0ef85f77f140be8dffa2f333070f0429c15bb2) Wraps file extension comparison components in strtolower() - [`25f92ce`](https://github.com/BookStackApp/BookStack/commit/25f92ce584cf058d225cbb3560b23ca558d60c0d) Add test to verify different case on extensions works - [`ca31096`](https://github.com/BookStackApp/BookStack/commit/ca310966b2ef52460c9ad7ca79dc707ff2ed3329) Actually add the test this time ### 📊 Changes **2 files changed** (+28 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Uploads/ImageRepo.php` (+1 -1) 📝 `tests/Uploads/ImageTest.php` (+27 -0) </details> ### 📄 Description Created to fix #5095 This avoids the issue where replacing file.PNG with newfile.png fails due to "PNG" not being equal to "png" --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:32:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6449