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

Raise Exception for SVG Watermark #3460

Merged
merged 5 commits into from
Dec 21, 2023
Merged

Conversation

firatbezir
Copy link
Contributor

@firatbezir firatbezir commented Dec 5, 2023

Fixes

Fixes #3373 by @obulat

Description

This checks if the URL ends with ".svg" or file type is an SVG and raises an UpstreamWatermarkException.

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@openverse-bot openverse-bot added 🟩 priority: low Low priority and doesn't need to be rushed 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🧱 stack: api Related to the Django API labels Dec 5, 2023
@firatbezir firatbezir marked this pull request as ready for review December 5, 2023 12:39
@firatbezir firatbezir requested a review from a team as a code owner December 5, 2023 12:39
@firatbezir firatbezir requested review from krysal and stacimc December 5, 2023 12:39
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @firatbezir, it looks great so far. I just have two requests before I can approve:

  1. Can you add a new unit test for this case? Existing watermark tests are in test_watermark.py.
  2. Please run the linting locally with just lint and commit the changes. The linting CI step is failing and must pass before we can merge a PR.

@openverse-bot
Copy link
Collaborator

Based on the low urgency of this PR, the following reviewers are being gently reminded to review this PR:

@krysal
@stacimc
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 10 day(s) ago. PRs labelled with low urgency are expected to be reviewed within 5 weekday(s)2.

@firatbezir, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings.

Footnotes

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

@sarayourfriend sarayourfriend marked this pull request as draft December 20, 2023 01:44
@sarayourfriend
Copy link
Collaborator

Just a heads up, @firatbezir, I'm converting this to a draft to avoid the repeated pings until the unit test is present. Thanks again for the contribution, looking forward to being able to merge it 🙂

@obulat obulat marked this pull request as ready for review December 20, 2023 11:13
Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, @firatbezir ! The CI passes :)

@firatbezir
Copy link
Contributor Author

@obulat that is great. I truely owe you a big thank for your help and patience.

@AetherUnbound
Copy link
Collaborator

@firatbezir is it okay to reopen this? I think we still want these changes!

@firatbezir
Copy link
Contributor Author

@AetherUnbound which changes did you mean?

@AetherUnbound
Copy link
Collaborator

This PR! It's closed but hasn't been merged yet. I'm going to reopen it so we can get the code merged in once it's reviewed 🙂

@AetherUnbound AetherUnbound reopened this Dec 20, 2023
@AetherUnbound AetherUnbound dismissed sarayourfriend’s stale review December 20, 2023 23:25

Changes have been addressed

@sarayourfriend sarayourfriend merged commit ca35fa5 into WordPress:main Dec 21, 2023
98 checks passed
@firatbezir firatbezir deleted the dev_firat branch March 30, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: api Related to the Django API
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Watermarking fails for SVG images
5 participants