Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
fix user agent check for Electron
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechampine committed Jun 22, 2015
1 parent a14eddc commit b1a0247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
func handleHTTPRequest(mux *http.ServeMux, url string, handler http.HandlerFunc) {
mux.HandleFunc(url, func(w http.ResponseWriter, req *http.Request) {
// prevent access from sources other than siac and Sia-UI
if req.UserAgent() != "Go 1.1 package http" && !strings.Contains(req.UserAgent(), "AtomShell") {
if req.UserAgent() != "Go 1.1 package http" && !strings.Contains(req.UserAgent(), "Electron") && !strings.Contains(req.UserAgent(), "AtomShell") {
writeError(w, "Browser access disabled due to security vulnerability. Use Sia-UI or siac.", http.StatusInternalServerError)
return
}
Expand Down

0 comments on commit b1a0247

Please sign in to comment.