Links to https://dropbox.com/sh/example/thing in stream descriptions fail to save
See original GitHub issueThe new call to is_static_or_current_realm_url assumes that self.md.zulip_realm is defined:
https://github.com/zulip/zulip/blob/ec99c1b58dc319fa3eaeaa883f6e18ed1add425c/zerver/lib/markdown/__init__.py#L584
This is not set for markdown descriptions of streams. As such, putting a URL of https://www.dropbox.com/sh/something/here into a stream description causes the description to fail to save, as rendering the markdown throws a 'NoneType' object has no attribute 'host' error:
https://github.com/zulip/zulip/blob/ec99c1b58dc319fa3eaeaa883f6e18ed1add425c/zerver/lib/subdomains.py#L73
We should:
- Error-proof
is_static_or_current_realm_urlby fixing the type ofrealmto beOptional[Realm]and addrealm is not None andbefore the check on line 73 - Fix
do_change_stream_descriptionto pass down the realm to the markdown renderer, so that we do get a realm in that spot, and can make use of it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to force a shared link to download or render
Share Dropbox files the way you want. Learn how to share files as links that force files to download or render in the...
Read more >HTTP - Developers - Dropbox.com
This endpoint performs User Authentication, validating the supplied access token, and returns the supplied string, to allow you to test your code and...
Read more >Common sharing errors and how to solve them - Dropbox Help
Open your new shared folder. Paste files from the old folder into the new shared folder. Now, these files will sync with shared...
Read more >Troubleshoot shared links - Dropbox Help Center
Whether you sent or received a shared link, it may fail to work or show a 404 error. If this happens, check the...
Read more >How to share a link to a Dropbox file or folder
Click Save. On the Dropbox desktop app. Open the Dropbox folder in File Explorer (Windows) or Finder (Mac). Right-click ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

OK, looking into this.
Note that part of this (typing and None-checking) has been fixed in #23159. #23386 is mainly about fixing
do_change_stream_description