Skip to content

Commit 79c5559

Browse files
author
Roberto Sora
authored
Merge pull request #393 from arduino/secure-origin
Allow only secure origins in CORS config
2 parents 4482124 + 10a7be1 commit 79c5559

File tree

9 files changed

+32
-32
lines changed

9 files changed

+32
-32
lines changed

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ goa gen github.com/arduino/arduino-create-agent/design
1818
Get the latest version of the Agent for all supported platforms:
1919

2020
### Windows
21-
* [Windows with Edge](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
22-
* [Windows with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
23-
* [Windows with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
21+
* [Windows with Edge](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
22+
* [Windows with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
23+
* [Windows with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
2424

2525
### MacOSX
26-
* [MacOSX with Safari](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
27-
* [MacOSX with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
28-
* [MacOSX with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
26+
* [MacOSX with Safari](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
27+
* [MacOSX with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
28+
* [MacOSX with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
2929

3030
### Linux
31-
* [Linux x64 with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
32-
* [Linux x64 with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
31+
* [Linux x64 with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
32+
* [Linux x64 with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
3333

3434
arduino-create-agent is a fork of @[johnlauer](https://github.com/johnlauer)'s [serial-port-json-server](https://github.com/johnlauer/serial-port-json-server) (which we really want to thank for his kindness and great work)
3535

@@ -148,18 +148,18 @@ or in the location selected during the installation
148148
Please use the current latest version:
149149
150150
### Windows
151-
* [Windows with Edge dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
152-
* [Windows with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
153-
* [Windows with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
151+
* [Windows with Edge dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
152+
* [Windows with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
153+
* [Windows with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
154154
155155
### MacOSX
156-
* [MacOSX with Safari dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
157-
* [MacOSX with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
158-
* [MacOSX with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
156+
* [MacOSX with Safari dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
157+
* [MacOSX with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
158+
* [MacOSX with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
159159
160160
### Linux
161-
* [Linux x64 with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
162-
* [Linux x64 with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
161+
* [Linux x64 with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
162+
* [Linux x64 with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
163163
164164
165165
## How to use it

config.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ hostname = unknown-hostname # Override the hostname we get from the OS
33
regex = usb|acm|com # Regular expression to filter serial port list
44
v = true # show debug logging
55
appName = CreateBridge
6-
updateUrl = http://downloads.arduino.cc/
6+
updateUrl = https://downloads.arduino.cc/
77
origins = http://local.arduino.cc:8000
88
#httpProxy = http://your.proxy:port # Proxy server for HTTP requests

design/pkgs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var IndexPayload = Type("arduino.index", func() {
8484
TypeName("IndexPayload")
8585

8686
Attribute("url", String, "The url of the index file", func() {
87-
Example("http://downloads.arduino.cc/packages/package_index.json")
87+
Example("https://downloads.arduino.cc/packages/package_index.json")
8888
})
8989
Required("url")
9090
})

docs/tools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Usage: You have to instantiate the struct by passing it the required parameters:
2727

2828
_tools := tools.Tools{
2929
Directory: "/home/user/.arduino-create",
30-
IndexURL: "http://downloads.arduino.cc/packages/package_index.json"
30+
IndexURL: "https://downloads.arduino.cc/packages/package_index.json"
3131
Logger: log.Logger
3232
}
3333

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func loop() {
253253

254254
extraOrigins := []string{
255255
"https://create.arduino.cc",
256-
"http://create.arduino.cc", "https://create-dev.arduino.cc", "http://create-dev.arduino.cc", "https://create-intel.arduino.cc", "http://create-intel.arduino.cc",
256+
"https://create-dev.arduino.cc", "https://create-intel.arduino.cc",
257257
}
258258

259259
for i := 8990; i < 9001; i++ {

tools/download_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ func Test_findBaseDir(t *testing.T) {
4040

4141
func TestTools_DownloadAndUnpackBehaviour(t *testing.T) {
4242
urls := []string{
43-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-armhf-pc-linux-gnu.tar.bz2",
44-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-aarch64-pc-linux-gnu.tar.bz2",
45-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i386-apple-darwin11.tar.bz2",
46-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-x86_64-pc-linux-gnu.tar.bz2",
47-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i686-pc-linux-gnu.tar.bz2",
48-
"http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i686-w64-mingw32.zip",
43+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-armhf-pc-linux-gnu.tar.bz2",
44+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-aarch64-pc-linux-gnu.tar.bz2",
45+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i386-apple-darwin11.tar.bz2",
46+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-x86_64-pc-linux-gnu.tar.bz2",
47+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i686-pc-linux-gnu.tar.bz2",
48+
"https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino14-i686-w64-mingw32.zip",
4949
}
5050
expectedDirList := []string{"bin", "etc"}
5151

tools/tools.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// You have to instantiate the struct by passing it the required parameters:
2727
// _tools := tools.Tools{
2828
// Directory: "/home/user/.arduino-create",
29-
// IndexURL: "http://downloads.arduino.cc/packages/package_index.json"
29+
// IndexURL: "https://downloads.arduino.cc/packages/package_index.json"
3030
// Logger: log.Logger
3131
// }
3232
type Tools struct {

trayicon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func setupSysTrayReal() {
166166
go func() {
167167
for {
168168
<-mUrl.ClickedCh
169-
open.Start("http://create.arduino.cc")
169+
open.Start("https://create.arduino.cc")
170170
}
171171
}()
172172
}

v2/pkgs/tools_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ func strpoint(s string) *string {
144144

145145
func url() string {
146146
urls := map[string]string{
147-
"linuxamd64": "http://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-x86_64-pc-linux-gnu.tar.bz2",
148-
"linux386": "http://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-pc-linux-gnu.tar.bz2",
149-
"darwinamd64": "http://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i386-apple-darwin11.tar.bz2",
150-
"windows386": "http://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-mingw32.zip",
147+
"linuxamd64": "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-x86_64-pc-linux-gnu.tar.bz2",
148+
"linux386": "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-pc-linux-gnu.tar.bz2",
149+
"darwinamd64": "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i386-apple-darwin11.tar.bz2",
150+
"windows386": "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-mingw32.zip",
151151
}
152152

153153
return urls[runtime.GOOS+runtime.GOARCH]

0 commit comments

Comments
 (0)