mooltipass icon indicating copy to clipboard operation
mooltipass copied to clipboard

Device not able to output GBP pound symbol "£" using keyboard layout en_UK

Open cybern0id opened this issue 7 years ago • 24 comments

Expected behavior

A password containg the GBP sign "£" should be output in full by the Mooltipass Mini when clicking the wheel for "Enter Password?"

Actual behavior

The device outputs all characters in the password preceeding the £ sign and stops; it does not output the £ sign or any characters after it.

Step by step guide to reproduce the problem

Save credentials with a password containing a GBP £ sign using the Mooltipass app. Confirm that "en_UK" is the active setting for keyboard layout. Confirm that the full password has been saved and is visible in the app in Credentials Management Mode. Try using the credentials for authentication and find that it fails. Check the plain text output from the device by trying to send the password to a text editor or similar.

Side note: strictly speaking, the ISO code for UK keyboard layout should be en_GB not en_UK as is currently displayed in the app.

Operating System

Debian Jessie

Mooltipass Extension

the chrome extension: 1.1.79

Mooltipass Application

the chrome application: 2.0.69

Mooltipass Device

The Mooltipass Mini

cybern0id avatar May 08 '17 01:05 cybern0id

Hello there,

Unfortunately we only support ASCII characters.

limpkin avatar May 08 '17 04:05 limpkin

Why did you close this bug?

  1. £ symbol is an extended ASCII character
  2. Why do you provide the ability to change keyboard layouts if you don't support the £ symbol which occurs as SHIFT+3 on all UK keyboards?

cybern0id avatar May 08 '17 07:05 cybern0id

I'll leave the issue open then. We unfortunately do not support extended ASCII codes.

limpkin avatar May 08 '17 07:05 limpkin

Do not or will not?

My second question remains unanswered. Why do you provide the option for different keyboard layouts if the en_UK layout does not reflect a UK keyboard?

Is it not possible to add £ symbol support easily?

cybern0id avatar May 08 '17 08:05 cybern0id

Do not : https://github.com/limpkin/mooltipass/blob/master/source_code/src/USB/usb.c#L994 However, if you'd like to create a quick hack for your use case you can modify our source easily: it's open source after all.

Why do you provide the option for different keyboard layouts if the en_UK layout does not reflect a UK keyboard?

We support UK keyboard layout for ASCII characters.

limpkin avatar May 08 '17 08:05 limpkin

I will try but again what is the exact purpose of providing different keyboard layouts?

cybern0id avatar May 08 '17 08:05 cybern0id

to provide different layout support for ascii characters.

limpkin avatar May 08 '17 08:05 limpkin

Before I go too far (I am not a coder so this is going to take me a long time hacking), is there enough space in the flash memory on the Mini to accommodate a new LUT for en_UK? i.e. a new bitmap for the £ symbol and new defines etc for it?

What I don't understand is that the Mini obviously has the ability to store and recall the symbol - I can see it in the chrome app, it just has no facility to output it....

cybern0id avatar May 08 '17 08:05 cybern0id

I ran into this issue today; it is confusing that the app lets you add "£" etc. when the device does not support it.

Would the following cover all the bases for a fix?:

  • Update the app to prevent disallowed characters being stored in credential management mode/quick add
  • Refuse to store passwords from the in-browser UI if they contain unsupported characters

dhharker avatar May 12 '17 17:05 dhharker

Well that's a complex topic: should we prevent non ascii characters when native integration actually uses them without any problem for storage/recall?

limpkin avatar May 12 '17 17:05 limpkin

I think we need some real UTF8 support. Some websites or passwords contain öäüß for example. I know its not wise to use those chars and I know its a pain to implement this, but mooltipass should be able to handle those in the future.

NicoHood avatar May 12 '17 19:05 NicoHood

@NicoHood I completely agree with you, but when we created the device we simply didn't have the resources. This may obviously change in the future.

limpkin avatar May 12 '17 19:05 limpkin

@limpkin @NicoHood I guess there is a distinction between being able to display the characters on the MP and being able to send the keystrokes?

Might there be an issue with storage space and memory management if you put actual UTF8 code tables on the device?

Equally, it should still be able to match (url) and output the correct bytes, even if it cannot interpret them?

dhharker avatar May 18 '17 11:05 dhharker

FYI: I have the issue with symbols ~ @ and ^. They are saved on device but fails to be written in a password field. Could we have a generic fix for this issue ? (I can eventually change my passwords but this take a lot of time for a large number)

ajira86 avatar Feb 27 '18 08:02 ajira86

~, @ and ^ should be supported... are you sure you selected the right keyboard?

limpkin avatar Feb 27 '18 08:02 limpkin

Yes, I use my usual keyboard, the frde_CH one. Sorry if I change the initial subject, should I open a new issue ?

ajira86 avatar Feb 27 '18 08:02 ajira86

frde_ch on PC or MAC?

limpkin avatar Feb 27 '18 08:02 limpkin

How could I go about expanding the capabilities to include ASCII extended characters? Is the devices memory sufficient? I'm not quite clear how the keyboard layouts are created.

telepath avatar Jan 12 '19 12:01 telepath

@telepath if you have experience in C, it would be better if you could help us on our newer device, which should support unicode BMP :)

limpkin avatar Jan 12 '19 13:01 limpkin

@limpkin that might be better for you, but since I own the Mooltipass mini, and this is a major flaw, I think it would be wise to fix it. Unless the capabilities do not allow it, in which case I'd have no choice but to return the device and wait for something better. I'd really get this solved, if possible. Also, I think a new device should not mean to stop supporting an older one, and I think this improvement would increase the usability of the existing device a lot.

telepath avatar Jan 12 '19 19:01 telepath

@telepath ASCII extended will not be as useful as full unicode support to most of our customers. We do provide support for our previous devices, but we unfortunately don't have the resources nor contributors to spend dozens of hours to add a feature which will be added for our next device in a much better way... I hope you'll understand. I can however provide you with a clear and exhaustive tutorial on how to add this support if you'd like.

limpkin avatar Jan 13 '19 16:01 limpkin

@limpkin if you have a plan to add unicode support to the mooltipass mini, I'll gladly see if I can help with that. Otherwise, I'd really appreciate the tutorial :)

telepath avatar Jan 13 '19 19:01 telepath

@telepath I'm afraid the mini's memory and file system is not meant to handle so many characters. Here are the main information you'll need:

  • routine in charge of simulating key presses: https://github.com/limpkin/mooltipass/blob/master/source_code/src/USB/usb.c#L1005
  • if to modify to compare to 255: https://github.com/limpkin/mooltipass/blob/master/source_code/src/USB/usb.c#L1017
  • tool to generate the generate your new keyboard LUT file: https://github.com/limpkin/mooltipass/tree/master/tools/keyboardLUTHidApi
  • variable to change to include all extended ascii chars: https://github.com/limpkin/mooltipass/blob/master/tools/keyboardLUTHidApi/keyboard.py#L122
  • once the .img is generated, move it to this folder: https://github.com/limpkin/mooltipass/tree/master/bitmaps/mini (replace an existing one)
  • use bundle.py -s fw_strings.txt to generate a new bundle.img
  • contact me personally to so I can explain how to sign and upload your own firmware

limpkin avatar Jan 13 '19 20:01 limpkin

@limpkin thanks for the summary! Could you give me some details on https://github.com/limpkin/mooltipass/tree/master/tools/keyboardLUTHidApi? I got it running, but after entering the keyboard language, I don't know how to proceed.

telepath avatar Feb 02 '19 10:02 telepath