Skip to content

Commit 10a7be1

Browse files
author
Gianluca Varisco
committed
Use secure origins only
1 parent 83043b2 commit 10a7be1

File tree

9 files changed

+33
-33
lines changed

9 files changed

+33
-33
lines changed

README.md

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

1818
### Windows
19-
* [Windows with Edge](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
20-
* [Windows with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
21-
* [Windows with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
19+
* [Windows with Edge](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
20+
* [Windows with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
21+
* [Windows with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
2222

2323
### MacOSX
24-
* [MacOSX with Safari](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
25-
* [MacOSX with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
26-
* [MacOSX with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
24+
* [MacOSX with Safari](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
25+
* [MacOSX with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
26+
* [MacOSX with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
2727

2828
### Linux
29-
* [Linux x64 with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
30-
* [Linux x64 with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
29+
* [Linux x64 with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
30+
* [Linux x64 with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
3131

3232
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)
3333

@@ -146,18 +146,18 @@ or in the location selected during the installation
146146
Please use the current latest version:
147147
148148
### Windows
149-
* [Windows with Edge dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
150-
* [Windows with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
151-
* [Windows with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
149+
* [Windows with Edge dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
150+
* [Windows with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
151+
* [Windows with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
152152
153153
### MacOSX
154-
* [MacOSX with Safari dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
155-
* [MacOSX with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
156-
* [MacOSX with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
154+
* [MacOSX with Safari dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
155+
* [MacOSX with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
156+
* [MacOSX with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
157157
158158
### Linux
159-
* [Linux x64 with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
160-
* [Linux x64 with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
159+
* [Linux x64 with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
160+
* [Linux x64 with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
161161
162162
163163
## How to use it
@@ -469,4 +469,4 @@ By making a contribution to this project, I certify that:
469469

470470
## Creating a release
471471
Just create a new release on GitHub, and our drone server will build and upload
472-
the compiled binaries for every architecture in a zip file in the release itself.
472+
the compiled binaries for every architecture in a zip file in the release itself.

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)