use encodeURIComponent to encode API password (#1027)

This commit is contained in:
Kory Prince 2018-03-25 02:34:59 -05:00 committed by c727
parent 3b76238241
commit 41e7235ccf

View File

@ -226,7 +226,7 @@ class HassioSnapshot extends Polymer.Element {
}
_computeDownloadUrl(snapshotSlug) {
const password = encodeURI(this.hass.connection.options.authToken);
const password = encodeURIComponent(this.hass.connection.options.authToken);
return `/api/hassio/snapshots/${snapshotSlug}/download?api_password=${password}`;
}