This is an automated email from the ASF dual-hosted git repository.
mattjackson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 683842e Strip riak formatting from URL Sig keys (#6089)
683842e is described below
commit 683842e4ff397965db94bae703397e518e34ea2b
Author: Steve Hamrick <[email protected]>
AuthorDate: Mon Aug 9 12:17:34 2021 -0600
Strip riak formatting from URL Sig keys (#6089)
---
traffic_ops/app/db/traffic_vault_migrate/riak.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/traffic_ops/app/db/traffic_vault_migrate/riak.go
b/traffic_ops/app/db/traffic_vault_migrate/riak.go
index fde1a3e..c26febf 100644
--- a/traffic_ops/app/db/traffic_vault_migrate/riak.go
+++ b/traffic_ops/app/db/traffic_vault_migrate/riak.go
@@ -426,6 +426,10 @@ func (tbl *riakURLSigKeyTable) gatherKeys(cluster
*riak.Cluster, timeout int) er
if err := json.Unmarshal(obj.Value, &key); err != nil {
return fmt.Errorf("RiakURLSigKey gatherKeys '%s' unable
to unamrshal object into tc.URLSigKeys: %w", obj.Key, err)
}
+ strLen := len(obj.Key)
+ if strLen > 7 && obj.Key[:8] == "url_sig_" &&
obj.Key[strLen-7:] == ".config" {
+ obj.Key = obj.Key[8 : strLen-7]
+ }
tbl.Records = append(tbl.Records, riakURLSigKeyRecord{
DeliveryService: obj.Key,
Key: key,