Prefer sdns:// which is less application-tainted

This commit is contained in:
Frank Denis 2018-01-22 12:00:42 +01:00
parent d7b8217018
commit 2d7920af22
2 changed files with 3 additions and 3 deletions

View File

@ -254,4 +254,4 @@ format = 'tsv'
[servers]
[servers.'scaleway-fr']
stamp = 'dnsc://AQMAAAAAAAAAEjIxMi40Ny4yMjguMTM2OjQ0M09FODAxOkI4NEU6QTYwNjpCRkIwOkJBQzA6Q0U0Mzo0NDVCOkIxNUU6QkE2NDpCMDJGOkEzQzQ6QUEzMTpBRTEwOjYzNkE6MDc5MDozMjREHzIuZG5zY3J5cHQtY2VydC5mci5kbnNjcnlwdC5vcmc'
stamp = 'sdns://AQMAAAAAAAAAEjIxMi40Ny4yMjguMTM2OjQ0M09FODAxOkI4NEU6QTYwNjpCRkIwOkJBQzA6Q0U0Mzo0NDVCOkIxNUU6QkE2NDpCMDJGOkEzQzQ6QUEzMTpBRTEwOjYzNkE6MDc5MDozMjREHzIuZG5zY3J5cHQtY2VydC5mci5kbnNjcnlwdC5vcmc'

View File

@ -32,8 +32,8 @@ func NewServerStampFromLegacy(serverAddrStr string, serverPkStr string, provider
func NewServerStampFromString(stampStr string) (ServerStamp, error) {
stamp := ServerStamp{}
if !strings.HasPrefix(stampStr, "dnsc://") {
return stamp, errors.New("Stamps are expected to start with dnsc://")
if !strings.HasPrefix(stampStr, "sdns://") && !strings.HasPrefix(stampStr, "dnsc://") {
return stamp, errors.New("Stamps are expected to start with sdns://")
}
bin, err := base64.RawURLEncoding.DecodeString(stampStr[7:])
if err != nil {