corona-warn-app / cwa-documentation

Project overview, general documentation, and white papers. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
3.28k stars 344 forks source link

Leading and trailing spaces in fields of quick test profile not trimmed #713

Open jkrwdf opened 2 years ago

jkrwdf commented 2 years ago

Avoid duplicates

Technical details

Describe the bug

Leading and trailing spaces in the fields of the quick test profile are kept for display and hence likely also in the QR code.

Here example with some spaces after the first name Peter

Screenshot_20210910-210107

Steps to reproduce the issue

Maintain quick test profile and accidentally enter spaces before or after the relevant content.

Expected behaviour

Trim both ends in all input fields.

jkrwdf commented 2 years ago

Multiple consecutive spaces inside the content should also be replaced by a single space.

While there is need for "Im Sand 12", there is none for "Im Sand 12", which is today also possible.

If CWA would be implemented in ABAP, the used statement would be CONDENSE ;-)

jkrwdf commented 2 years ago

As the use of a proportional font in the browser might hide my last issue, here another screenshot from CWA for clarity:

Screenshot_20210911-063334~2

MikeMcC399 commented 2 years ago

@jkrwdf

There was a discussion about input validation for the Rapid Test Profile in the issue https://github.com/corona-warn-app/cwa-documentation/issues/605 which led to emoji input being blocked through PR https://github.com/corona-warn-app/cwa-app-android/pull/3597.

Some input validation was added by PR https://github.com/corona-warn-app/cwa-app-android/pull/3771 and there is a comment there which make me think that further input validation isn't planned for the Rapid Test Profile.

Currently a user can enter not only leading and trailing spaces, but also characters like +x=/()<>[]{} into name fields of a Rapid Test Profile.

jkrwdf commented 2 years ago

I acknowledge that it is a hard task to perform semantic validation of these fields and is therefore also not requested.

However, a technical issue with unnecessary and highly likely unwanted space characters is in my opinion a no-brainer.

Note that those fields are regularly filled in on a mobile phone and their keyboards have own "intelligence" features which promote accidental insertion of space characters. The additional space at the end of the first name happened exactly this way.

Ein-Tim commented 2 years ago

This is also a problem under iOS.

MikeMcC399 commented 2 years ago

This is also a problem under iOS.

So it would make sense to move the issue to cwa-documentation if it impacts both Android and iOS.

jkrwdf commented 2 years ago

My hope was it gets fixed, not only "documented".

I feel the project misses a ticket category for bugs in both operating systems.

As Android user I can only open in this repo, but if it then turns out the same issue exists in iOS also, it's still a bug.

MikeMcC399 commented 2 years ago

@jkrwdf Perhaps there is a misunderstanding?

The cwa-documentation repository is used to keep track of bugs which impacts both Android and iOS. That's the process. It doesn't mean that moving an issue to the cwa-documentation repository reduces the bug report to a documentation error.

See the template for reporting bugs in this Android repository which includes the line:

jkrwdf commented 2 years ago

Thanks for the individual clarification.

Perhaps I was misleaded by the misleading description of that repository "Project overview, general documentation, and white papers" which did not sound to me very promising.

MikeMcC399 commented 2 years ago

@jkrwdf

Perhaps I was misleaded by the misleading description of that repository "Project overview, general documentation, and white papers" which did not sound to me very promising.

Thanks for pointing this out! I have submitted a documentation issue https://github.com/corona-warn-app/cwa-documentation/issues/707 "Repository description and README do not mention use for app bugs of iOS and Android" to report this shortcoming. 🙂

Ein-Tim commented 2 years ago

Can we please transfer this to the documentation repository & get an Internal Tracking ID for it @dsarkar?

Ein-Tim commented 2 years ago

Issue persists in CWA 2.20. Any update available here @dsarkar? This is considered as a Story, or?