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

IBX-7485: Implemented custom Filesystem that handles corrupted filepaths #399

Closed
wants to merge 1 commit into from

Conversation

barw4
Copy link
Member

@barw4 barw4 commented Jan 5, 2024

Proof of concept PR

Question Answer
JIRA issue IBX-7485
Type bug
Target Ibexa version v3.3
BC breaks no

This PR overrides league/flysystem's Filesystem class so it handles already existing files with broken paths gracefully.

I intentionally overrode only some of the methods of the original class as we still should disallow uploading files with broken names, this should fix the issue with broken names already existing in the filesystem/db.

Another idea (skipping broken files): #400

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/engineering-team).

Copy link

sonarcloud bot commented Jan 5, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@barw4 barw4 requested a review from a team January 5, 2024 13:16
@barw4 barw4 marked this pull request as ready for review January 5, 2024 14:37
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We rely on that filesystem in many places (nfs, multirepo) and regression coverage is still not what we aim to, so it's best to avoid touching it.

Favoring #400 over this.

@barw4 barw4 closed this Jan 19, 2024
@barw4 barw4 deleted the ibx-7845-handle-corrupted-paths-filesystem branch January 19, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Ready for review
Development

Successfully merging this pull request may close these issues.

4 participants