22003: Workbench2 and keep-web: better interoperability with redirect
authorZoë Ma <zoe.ma@curii.com>
Fri, 12 Jul 2024 13:27:09 +0000 (21:27 +0800)
committerZoë Ma <zoe.ma@curii.com>
Thu, 25 Jul 2024 02:57:00 +0000 (10:57 +0800)
commitcb22c03c206e064f28408689f11247992f8ae44c
treeccace213cb0c176c222471fb6e04d88aff23bee2
parent4a883e2d383d99260a1301770faf20e77b594d1c
22003: Workbench2 and keep-web: better interoperability with redirect

keep-web: When sending an unauthenticated browser client to a redirect
to Wb2, encode the target URL path in the query part of the redirection
URL in the `Location` header. This avoids possible corrupted header and
confused client.

Workbench2:

- In redirection handler, more robust handling of the input target-path
  passed by the URL query part.
- In the "copy link to clipboard" action in the files panel of a
  collection view, when creating the URL for clipboard, better emulate
  the server-generated redirect URL (see above).

Overall, when working with redirects (either generating redirect URLs or
handling them on the client side), we're better prepared for paths that
may contain special characters.

Arvados-DCO-1.1-Signed-off-by: Zoë Ma <zoe.ma@curii.com>
services/keep-web/handler.go
services/workbench2/src/common/redirect-to.test.ts
services/workbench2/src/common/redirect-to.ts
services/workbench2/src/views-components/context-menu/actions/helpers.test.ts
services/workbench2/src/views-components/context-menu/actions/helpers.ts