Use backend service to verify nodeID (fixes #418)

This commit is contained in:
Jakob Borg
2014-07-18 10:00:02 +02:00
parent 4fe2992924
commit 3388d5b49c
4 changed files with 27 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ import (
"encoding/base32"
"errors"
"fmt"
"log"
"regexp"
"strings"
@@ -120,7 +119,6 @@ func unluhnify(s string) (string, error) {
return "", err
}
if g := fmt.Sprintf("%s%c", p, l); g != s[i*14:(i+1)*14] {
log.Printf("%q; %q", g, s[i*14:(i+1)*14])
return "", errors.New("check digit incorrect")
}
res = append(res, p)