URI handling (WIP) #116
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#116
Loading…
Reference in a new issue
No description provided.
Delete branch "uri-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements opening LBRY URIs using Electron's built-in support.
Electron only has very basic support for this: on Mac it works well, but on Windows it can only pass the URI in as a command line argument (i.e. you can't launch URIs in an app that's already running), and there's no Linux support at all yet.
I'm thinking we'd be best off to use the built-in functionality like this, and then eventually hack on improvements for Win and Linux. Here are some ideas about how to do it in Linux.
Nice. Gonna test this after I'm done with api stuff. Should this validate that the requested URI is a valid URI? what if they request
x&sendcreditstohacker=100000
Oops, possibly shouldn't have merged this, was discussing with Alex on Slack and missed @lyoshenka's latest comment.
This doesn't directly alter window.location. It calls App.showUri() which updates the UI to display the Show page. That function does alter the current URI stored in state and creates a history item, but even there it runs the LBRY URI through encodeURIComponent so I don't think there's any potential for injection attacks.
We should probably add a separate error page for invalid URIs, though. Right now it just silently does nothing (at least on master; might have changed on Redux).