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

Mangled Links disable Text #6841

Open
kousu opened this issue Jan 6, 2025 · 0 comments
Open

Mangled Links disable Text #6841

kousu opened this issue Jan 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kousu
Copy link

kousu commented Jan 6, 2025

Describe the bug
A mangled link href can cause Text to fail to load (partially or completely) a document, making it unrecoverable (at least, not without ssh-based surgery and an idea of what to look for). Rich-text is also disabled but that doesn't matter much because it's unsaveable, too.

VSCode and GitHub can render these mangled hrefs fine, and it would be nice if NextCloud strove to match that, but on top of that Text itself seems to have been responsible in my case for mangling the link. I had a long-running document I'd used for over a year and suddenly I found I couldn't edit it.

My mangled URL is

https://data=!3m1!1e3!4m6!3m5!1s0xf2d1e9f43f86d168:0x24ff3efacb16eb08!8m2!3d25.0078305!4d54.9942305!16s%2Fg%2F11kpkcd3q9?entry=ttu

The issue seems to be around lacking a domain part to the URL, but I haven't exhaustively tested.

To Reproduce
Steps to reproduce the behavior:

Case I, where the document is totally unusable:

  1. Upload the following .md file: Bug.md
  2. Open it
  3. The load will hang

Or, Case II, where the document remains openable but missing content (often the entire content):

  1. New -> Text Document

  2. Add some headings and content

  3. Close and re-open it, verifying that the content is there

  4. Copy-paste this link into the document: Le Palm

  5. Close and reopen it; it will be blank, or maybe contain only partial content.

    I'm not sure what the pattern is; in fact in my testing I went from seeing "etc etc" a couple times in a row to a blank page, with no changes made to the actual file on disk in between.

  6. Verify the contents under ssh to see what's actual saved on disk

  7. Re-open it and try to use the rich-text features; none of them work
    Expected behavior
    The document should remain readable and editable. Malformed links shouldn't accidentally make the entire file inaccessible.

Screenshots

Case I

Image

Case II

Create and save a file:

Image
Image
Image

Paste the mangled link in:

Image

On reopening the file is missing most of its content:

Image

When trying to add more content, rich text is no longer active, and ...

Image

...nothing is saved on reopening (even though the save icon claimed it was):

Image

Verifying under ssh shows that the document is in the state as of the third screenshot, but the further edit did not take

www-data@org:~/nextcloud/data/admin/files$ cat Bug2.md 
# Bug2

- This is a list

etc etc

Copy-paste this link into the document: [Le Palm](https://data=!3m1!1e3!4m6!3m5!1s0xf2d1e9f43f86d168:0x24ff3efacb16eb08!8m2!3d25.0078305!4d54.9942305!16s%2Fg%2F11kpkcd3q9?entry=ttu)www-data@org:~/nextcloud/data/admin/files$ 

Server details:

  • Nextcloud version: 29.0.10.1
  • PHP Version: 8.2
  • Database: MariaDB 10.11.6

Client details:

  • OS: Ubuntu
  • Browser: Firefox
  • Browser version: 133.0.3 (64 bits)
  • Device: Desktop

🌟 🌟 And let me say thank you for all the hard work you put into NextCloud. It's such a breath of fresh air for me and my friends from the usual vendor lock-in 🪁 🌟 🌟

@kousu kousu added the bug Something isn't working label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant