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

Do not sanitize http:// attachment URLs #1122

Merged
merged 3 commits into from
May 11, 2024

Conversation

caronc
Copy link
Owner

@caronc caronc commented May 5, 2024

Description:

Related issue (if applicable): #1118

Apprise Attachments that are HTTP based should not sanitize their URLs to the level others are handled at. Hence

  • http://hostname/?KeYWord=ARG would parse KeyWord and assign it ARG. the subtle difference is in normal circumstances, the key is made lowercase in Apprise to make URL generation easier on the end user.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@1118-do-not-sanitize-http-attachments

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
   --attach="http://a-location/?Where=CaseSensitive-KeYS&Content=MaTTER"
    schema://credentials"

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.29%. Comparing base (5fd912f) to head (65a2cb6).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1122      +/-   ##
==========================================
+ Coverage   99.28%   99.29%   +0.01%     
==========================================
  Files         139      139              
  Lines       18067    18066       -1     
  Branches     3690     3689       -1     
==========================================
+ Hits        17937    17938       +1     
+ Misses        121      119       -2     
  Partials        9        9              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stv0g
Copy link

stv0g commented May 7, 2024

Thanks this indeed fixes #1118 for me

@caronc caronc force-pushed the 1118-do-not-sanitize-http-attachments branch from a44eb8f to 10898cc Compare May 11, 2024 19:11
@caronc
Copy link
Owner Author

caronc commented May 11, 2024

I'll need to revisit this in another release Apprise. I can't reproduce the testing on the GitHub servers that hang indefinitely and timeout after these changes. I've introduced some kind of deadlock of some sort with this (what seems like a) small change.

n/m; I found the deadlock situation and resolved it 🚀

@caronc caronc merged commit fa2d338 into master May 11, 2024
13 checks passed
@caronc caronc deleted the 1118-do-not-sanitize-http-attachments branch May 28, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants