[GH-ISSUE #53] URLs without protocol allowed #33

Closed
opened 2026-02-25 23:33:18 +03:00 by kerem · 1 comment
Owner

Originally created by @peteretelej on GitHub (Mar 6, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/53

Invalid and unresolved URLs are currently allowed for bookmarking, where the bookmark is added but an error logged on stdout, eg bad cert, unsupported protocol.. github.com/RadhiFadlillah/shiori@9d3c8eedf9/cmd/add.go (L72)

For URLs without no protocol http/ftp/https/etc is an actual error / preventing addition a good idea? like pocket does:
screenshot from 2018-03-06 19-35-41

Originally created by @peteretelej on GitHub (Mar 6, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/53 Invalid and unresolved URLs are currently allowed for bookmarking, where the bookmark is added but an error logged on stdout, eg bad cert, unsupported protocol.. https://github.com/RadhiFadlillah/shiori/blob/9d3c8eedf9379edd3ab2bce974e912f4b579ae97/cmd/add.go#L72 For URLs without no protocol http/ftp/https/etc is an actual error / preventing addition a good idea? like pocket does: ![screenshot from 2018-03-06 19-35-41](https://user-images.githubusercontent.com/2271973/37045148-4d9106a8-2176-11e8-8d2b-8424efd49895.png)
kerem closed this issue 2026-02-25 23:33:18 +03:00
Author
Owner

@RadhiFadlillah commented on GitHub (Mar 8, 2018):

For URLs without protocol (e.g http/ftp/https/etc) is an actual error / preventing addition a good idea ?

Yeah, shiori is supposed to give error warning if submitted URL is invalid. However, today I just learned that url.Parse returns valid on almost everything, while url.ParseRequestURI will return error if URL invalid.

I've replaced those url.Parse in commit fd1f190.

Unresolved URLs are currently allowed for bookmarking

Actually, this is intended. The idea is user can save any valid URL to bookmark list, even when not connectedd to internet.

<!-- gh-comment-id:371495685 --> @RadhiFadlillah commented on GitHub (Mar 8, 2018): > For URLs without protocol (e.g http/ftp/https/etc) is an actual error / preventing addition a good idea ? Yeah, `shiori` is supposed to give error warning if submitted URL is invalid. However, today I just [learned](https://stackoverflow.com/questions/31480710/validate-url-with-standard-package-in-go) that `url.Parse` returns valid on almost everything, while `url.ParseRequestURI` will return error if URL invalid. I've replaced those `url.Parse` in commit [fd1f190](https://github.com/RadhiFadlillah/shiori/commit/fd1f190800162cfc916cd546a14a4c2c9e407ece). > Unresolved URLs are currently allowed for bookmarking Actually, this is intended. The idea is user can save any valid URL to bookmark list, even when not connectedd to internet.
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
starred/shiori#33
No description provided.