You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before 6d74978 and 44b35f7 anyone* could connect to a running fish_config server and send code to (e.g.) set_prompt, which is obviously bad.
That's been clamped down to localhost-only now, which helps, but it's still possible for someone on your local machine to wait for you to start fish_config and then talk to the server.
There's a perfect API for verifying who is on the other end of a local IP/IPv6 socket - getpeerucred(3). Unfortunately, it's only available on Solaris.
We could include an authentication key in the URL, but that could be read from the command line.
Note that #1441 still doesn't stop attackers on the same machine from sending arbitrary code to fish_config. I have not been struck by inspiration for a fix on mainstream platforms.
Next silly idea: write the main config page to ~/.config/fish/fish_config.html. Stick a secret token in there, and send the user to file:///HOME/.config/fish/fish_config.html.
This might require setting a CORS policy on the server, but that's not so bad.
Activity
amluto commentedon Apr 28, 2014
See #1441 for a nicer version of this.
zanchey commentedon Jun 28, 2014
Note that #1441 still doesn't stop attackers on the same machine from sending arbitrary code to
fish_config. I have not been struck by inspiration for a fix on mainstream platforms.amluto commentedon Jun 28, 2014
Use a token in a query string, perhaps? Or maybe a secret URL prefix?
zanchey commentedon Jun 29, 2014
You can see that sort of thing in the process table unfortunately.
amluto commentedon Jun 29, 2014
Next silly idea: write the main config page to ~/.config/fish/fish_config.html. Stick a secret token in there, and send the user to file:///HOME/.config/fish/fish_config.html.
This might require setting a CORS policy on the server, but that's not so bad.
Authenticate connections to web_config service
zanchey commentedon Jul 31, 2014
Good idea! I've implemented something similar in #1587.
Authenticate connections to web_config service
Authenticate connections to web_config service
Authenticate connections to web_config service
Authenticate connections to web_config service
Authenticate connections to web_config service