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

Added safeguards to prevent crashes when rendering corrupt URLs #473

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

danschwarz
Copy link
Collaborator

@danschwarz danschwarz commented Mar 9, 2024

Urwidgets' Hyperlink widget (correctly) throws an exception when presented with a URL containing disallowed characters (i.e. control characters.) If we get a corrupt URL in a status posting, this will cause a crash. An example of such a status is here. If this loads in the TUI today, ,it will crash.

With this PR, we will react to corrupt URLs by rendering as urwid.Text rather than Hyperlink and there will be no crash.

Given the recent comments about switching to tooi, this will probably be the last PR I submit for the toot tui. It makes more sense to focus efforts on the tooi front end.

@danschwarz danschwarz requested a review from ihabunek March 9, 2024 22:08
@marathone
Copy link

I'm just a simple user of this app, but I, for one, have appreciated all the recent work done by Mr. Schwarz! He was a breath of fresh air to what was a stale product before he arrived on the scene, in my opinion. No offence to ihabunek intended.

@ihabunek ihabunek merged commit 4b17e2e into ihabunek:master Mar 12, 2024
6 checks passed
@ihabunek
Copy link
Owner

Thanks!

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.

3 participants