Skip to content

Commit 108f7d2

Browse files
committed
Merge pull request #93 from arduino/fix_network
Don't check for the signature validity for a network upload
2 parents ec693c2 + 68dedcd commit 108f7d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

conn.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,15 @@ func uploadHandler(c *gin.Context) {
7676
return
7777
}
7878

79-
err := verifyCommandLine(commandline, signature)
79+
if extraInfo.networkPort {
80+
err := verifyCommandLine(commandline, signature)
8081

81-
if err != nil {
82-
c.String(http.StatusBadRequest, "signature is invalid")
83-
log.Error("signature is invalid")
84-
log.Error(err)
85-
return
82+
if err != nil {
83+
c.String(http.StatusBadRequest, "signature is invalid")
84+
log.Error("signature is invalid")
85+
log.Error(err)
86+
return
87+
}
8688
}
8789

8890
extraInfo.use_1200bps_touch, _ = strconv.ParseBool(c.PostForm("use_1200bps_touch"))

0 commit comments

Comments
 (0)