Opened 4 years ago

Last modified 2 years ago

#16405 new bug

[open] doesn't handle URLs with spaces

Reported by: diver Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/Command Line Tools Version: R1/beta2
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Spotify-qt tries to open a link which contains spaces using /bin/open

Something like this:

open "https://accounts.spotify.com/authorize?client_id=000&response_type=code&redirect_uri=http://localhost:8888&scope=playlist-read-colla
borative playlist-read-private"
No such file or directory

macOS version of open works fine with the same link.

Change History (1)

comment:1 by nephele, 2 years ago

[ 10193] open_dir(0xffffffff, "https://accounts.spotify.com/authorize?client_id=000&response_type=code&redirect_uri=http:") = 0x80006003 () (25 us)
[ 10193] open_dir(0xffffffff, "https://accounts.spotify.com/authorize?client_id=000&response_type=code&redirect_uri=http:") = 0x80006003 () (23 us)
[ 10193] open_dir(0xffffffff, "https://accounts.spotify.com") = 0x80006003 () (25 us)
open: "https://accounts.spotify.com/authorize?client_id=000&response_type=code&redirect_uri=http://localhost:8888&scope=playlist-read-colla
borative playlist-read-private": No such file or directory
[ 10193] write(0x2, 0xffffffffffffffff, 0x7ff02c353330, 0xc7) = 0xc7 () (19 us)
[ 10193] delete_sem(0x244fb) = 0x0 No error () (14 us)
[ 10193] read_stat(0x3, (nil), false, 0x7ff02c355410, 0x80) = 0x0 No error () (16 us)
[ 10193] close(0x3) = 0x0 No error () (14 us)
[ 10193] delete_sem(0x244bd) = 0x0 No error () (14 us)
[ 10193] delete_sem(0x244b7) = 0x0 No error () (15 us)
[ 10193] delete_sem(0x244f3) = 0x0 No error () (14 us)
[ 10193] delete_sem(0x244f5) = 0x0 No error () (14 us)
[ 10193] delete_sem(0x244f0) = 0x0 No error () (14 us)
[ 10193] delete_sem(0x244f1) = 0x0 No error () (15 us)
[ 10193] delete_port(0x5353) = 0x0 No error () (15 us)
[ 10193] delete_port(0x5354) = 0x0 No error () (15 us)
[ 10193] delete_port(0x5355) = 0x0 No error () (15 us)
[ 10193] delete_sem(0x244f2) = 0x0 No error () (14 us)
[ 10193] exit_team(0x1) () (15 us)

Looks like the problem is not with spaces but that it thinks it is a directory.
Also, spaces are illegal characters in a uri and are to be encoded as %20 iirc, so why would this ever be called? I don't see any spaces in your uri anyway

edit: saw it now at the very end, but this seems like a bug in spotify to me, it's not passing a valid uri thuse open not treating it as one seems okay to me

Last edited 2 years ago by nephele (previous) (diff)
Note: See TracTickets for help on using tickets.