16561: Handle implicit port number in ws:// and wss:// urls.
[arvados.git] / lib / controller / router / router.go
index e42d9a555b5993e00e2a7ce3eff29ab174ab0b44..586ea8e676ec9ae2a08a7f1855f7f17d8ef5754a 100644 (file)
@@ -407,7 +407,7 @@ func (rtr *router) addRoutes() {
                },
                {
                        arvados.EndpointAPIClientAuthorizationList,
-                       func() interface{} { return &arvados.ListOptions{} },
+                       func() interface{} { return &arvados.ListOptions{Limit: -1} },
                        func(ctx context.Context, opts interface{}) (interface{}, error) {
                                return rtr.backend.APIClientAuthorizationList(ctx, *opts.(*arvados.ListOptions))
                        },
@@ -597,7 +597,11 @@ func (rtr *router) addRoute(endpoint arvados.APIEndpoint, defaultOpts func() int
                                        tokenUUIDs = append(tokenUUIDs, tokenParts[1])
                                }
                        } else {
-                               tokenUUIDs = append(tokenUUIDs, "v1 token ending in "+t[len(t)-5:])
+                               end := t
+                               if len(t) > 5 {
+                                       end = t[len(t)-5:]
+                               }
+                               tokenUUIDs = append(tokenUUIDs, "v1 token ending in "+end)
                        }
                }
                httpserver.SetResponseLogFields(req.Context(), logrus.Fields{"tokenUUIDs": tokenUUIDs})