Fix crashing with invalid channel names + published content #2693

Open
opened 2019-07-30 00:08:13 +02:00 by tzarebczan · 0 comments
tzarebczan commented 2019-07-30 00:08:13 +02:00 (Migrated from github.com)

The Issue

We check if the uri is valid here https://github.com/lbryio/lbry-desktop/blob/master/src/ui/component/claimPreview/view.jsx#L72 but not the channel. In the last version, there was a bug that allowed channels with spaces in them and they would crash the app if content was posted to it.

I tried something along the lines of 7185a7aa04 but that didn't seem to fix the issue either - we must still preview invalid ones (probably just needs to check that flag before previewing).

Ultimately it should not crash the app and allow navigation to said claims, but still not allow their creation in publish/channel create.

Also, I noticed search results don't return anything if even a single returned item has invalid characters or blank (see https://github.com/lbryio/chainquery/issues/122)

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-desktop/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.com --> ## The Issue We check if the uri is valid here https://github.com/lbryio/lbry-desktop/blob/master/src/ui/component/claimPreview/view.jsx#L72 but not the channel. In the last version, there was a bug that allowed channels with spaces in them and they would crash the app if content was posted to it. I tried something along the lines of https://github.com/lbryio/lbry-desktop/commit/7185a7aa047d0bf6266897766eab62633e06b2fd but that didn't seem to fix the issue either - we must still preview invalid ones (probably just needs to check that flag before previewing). Ultimately it should not crash the app and allow navigation to said claims, but still not allow their creation in publish/channel create. Also, I noticed search results don't return anything if even a single returned item has invalid characters or blank (see https://github.com/lbryio/chainquery/issues/122) ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#2693
No description provided.