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

Prevent notification attachments failing due to spaces ( ) in url #3930

Merged

Conversation

jpelgrom
Copy link
Member

Summary

Fix #3926 by automatically replacing in URLs with the encoded character %20. Not replacing any other characters as that might break URLs including already encoded URLs. (This feels like a 'safe' change to automatically handle common user errors.)

Without this change, a notification attachment containing a space will fail the URL validation. Because of that failure it returns the base URL and downloads it (= the login page), which then cannot be processed as an image/video.

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

Looks good to me and the user confirmed the actual issue too. I do agree as well this should solve the most common case.

#3926 (comment)

@JBassett JBassett merged commit dbbf747 into home-assistant:master Oct 13, 2023
3 checks passed
@jpelgrom jpelgrom deleted the handle-invalid-image-urls-better branch October 13, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phone Notification Local Image fails to download
3 participants