lens
lens copied to clipboard
extension protocol handler response is always lower case
Describe the bug After upgrading from 5.5 to 6.0, my extension gets a lowered protocol routing.
To Reproduce Steps to reproduce the behavior:
- Go to 'lens://extension/bla/bla/TEST/TEST'
- Wait for lens to be focus, see log.
Expected behavior Case should send correctly.
Environment (please complete the following information):
- Lens Version: 6.0.1
- OS: Linux
- Installation method (e.g. snap or AppImage in Linux): rpm
Logs: When you run the application executable from command line you will see some logging output. Please paste them here:
info: [PROTOCOL ROUTER]: routing lens://extension/bla/bla/test/test
Additional context Add any other context about the problem here.
Do you have evidence that the values being provided to your extension are lowercased as well? I tried to reproduce both in unit tests (wasn't happening there) and manually testing on macOS and linux find that we don't lowercase them at all.
On linux I ran lens lens://app/FOOBAR
from the command line and within lens the uppercase was still present.
So this sort of sounds like whatever is configured to run the through the opening (probably xdg-open
) is lowercasing it.
We changed our logic. So, we don't need any more the protocol feature.
We have the same bad behavior in our lens extension in latest lens version. The extension has authorization and uses authorization code flow to retrieve token from identity provider.
When external browser after successful authorization step redirects to lens via url (for example, lens:\\extension\<name of extension>\pathToHandler?code=AbC&state=DeF
) the whole url converted to lowercase. Then app uses code from query string to retrieve token.
Our identity provider supposes that code is bad because token validation case-sensitive and also signature check of the code failed.
I think, the problem related to these parts: https://github.com/lensapp/lens/blob/master/packages/core/src/main/start-main-application/runnables/show-initial-window.injectable.ts#L15 https://github.com/lensapp/lens/blob/master/packages/core/src/main/electron-app/runnables/setup-deep-linking.injectable.ts#L67
UPD: I forgot, we use Lens 6.4.0 for Windows