From 2d7920af2279c426334bf02ef44b9d0035b0ef3c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 22 Jan 2018 12:00:42 +0100 Subject: [PATCH] Prefer sdns:// which is less application-tainted --- dnscrypt-proxy/dnscrypt-proxy.toml | 2 +- dnscrypt-proxy/stamps.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dnscrypt-proxy/dnscrypt-proxy.toml b/dnscrypt-proxy/dnscrypt-proxy.toml index 2e4a5221..e674662d 100644 --- a/dnscrypt-proxy/dnscrypt-proxy.toml +++ b/dnscrypt-proxy/dnscrypt-proxy.toml @@ -254,4 +254,4 @@ format = 'tsv' [servers] [servers.'scaleway-fr'] - stamp = 'dnsc://AQMAAAAAAAAAEjIxMi40Ny4yMjguMTM2OjQ0M09FODAxOkI4NEU6QTYwNjpCRkIwOkJBQzA6Q0U0Mzo0NDVCOkIxNUU6QkE2NDpCMDJGOkEzQzQ6QUEzMTpBRTEwOjYzNkE6MDc5MDozMjREHzIuZG5zY3J5cHQtY2VydC5mci5kbnNjcnlwdC5vcmc' + stamp = 'sdns://AQMAAAAAAAAAEjIxMi40Ny4yMjguMTM2OjQ0M09FODAxOkI4NEU6QTYwNjpCRkIwOkJBQzA6Q0U0Mzo0NDVCOkIxNUU6QkE2NDpCMDJGOkEzQzQ6QUEzMTpBRTEwOjYzNkE6MDc5MDozMjREHzIuZG5zY3J5cHQtY2VydC5mci5kbnNjcnlwdC5vcmc' diff --git a/dnscrypt-proxy/stamps.go b/dnscrypt-proxy/stamps.go index 86d50383..7eb4afb0 100644 --- a/dnscrypt-proxy/stamps.go +++ b/dnscrypt-proxy/stamps.go @@ -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 {