[ARVADOS] updated: 2.1.0-1931-g63645c871

Git user git at public.arvados.org
Thu Feb 17 18:03:53 UTC 2022


Summary of changes:
 lib/config/load.go | 3 +++
 1 file changed, 3 insertions(+)

       via  63645c871246a61a2148b259f10d2fedf30e8df8 (commit)
      from  d6c1841ea8d87238fa18a673fb524985e826ae19 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 63645c871246a61a2148b259f10d2fedf30e8df8
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Feb 17 13:03:33 2022 -0500

    18676: be a bit more specific in testing for V2 tokens.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/lib/config/load.go b/lib/config/load.go
index e412c87ff..7136c60e4 100644
--- a/lib/config/load.go
+++ b/lib/config/load.go
@@ -358,6 +358,9 @@ func (ldr *Loader) checkToken(label, token string, mandatory bool, acceptV2 bool
 		if len(tmp) != 3 {
 			return fmt.Errorf("%s: unacceptable characters in token (only a-z, A-Z, 0-9 are acceptable)", label)
 		}
+		if strings.Index(token, "v2/") == -1 {
+			return fmt.Errorf("%s: unacceptable characters in token (only a-z, A-Z, 0-9 are acceptable)", label)
+		}
 		ldr.Logger.Warnf("%s: token is a full V2 token, should just be a secret (remove everything up to and including the last forward slash)", label)
 		if !acceptableTokenRe.MatchString(tmp[2]) {
 			return fmt.Errorf("%s: unacceptable characters in V2 token secret (only a-z, A-Z, 0-9 are acceptable)", label)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list