Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Format of hardcoded error messages regarding security #2120

Closed
2 of 3 tasks
MikeMcC399 opened this issue Jan 16, 2021 · 7 comments
Closed
2 of 3 tasks

Format of hardcoded error messages regarding security #2120

MikeMcC399 opened this issue Jan 16, 2021 · 7 comments
Assignees
Labels
bug Something isn't working community Tag issues created by community members Fix 1.11 Fix is planned for 1.11 mirrored-to-jira This item is also tracked internally in JIRA

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jan 16, 2021

Avoid duplicates

Technical details

  • App version: 1.10.1 branch release/1.11.x

Describe the bug

In the following string, the message is not capitalised:

"an error occurred while trying to establish a secure connection to the server",

In the following string, the message is not capitalised and there is no space between the words "refer" and "to"

In 1.10.1

"something went wrong during a critical part of the application ensuring security, please refer" +
"to the details for more information",

In release/1.11.x

"something went wrong during a critical part of the application ensuring security, please refer" +
" to the details for more information",

Steps to reproduce the issue

Code inspection only.

Expected behaviour

The error message in
CwaWebException.kt
should be formatted consistent with the capitalisation of other similar error message in the app:
image

The error message in
CwaSecurityException.kt
should be capitalised and contain a space between the words "refer" and "to".

Possible Fix

Capitalise the first word in the error message string of CwaWebException.kt
"an error occurred while trying to establish a secure connection to the server",
to
"An error occurred while trying to establish a secure connection to the server",

Capitalise the first word in the error message string of
CwaSecurityException.kt and add a space at the end of the string so that
"something went wrong during a critical part of the application ensuring security, please refer" +
becomes
"Something went wrong during a critical part of the application ensuring security, please refer" +

Additional context

Please let me know if the Open Source Team would like a pull request for the above suggested changes and if so what the target branch should be (release/1.n.x).


EXPOSUREAPP-4655

@MikeMcC399 MikeMcC399 added the bug Something isn't working label Jan 16, 2021
@PhilippNowak96
Copy link
Contributor

Missing space is already fixed with 1.11, see

"something went wrong during a critical part of the application ensuring security, please refer" +
" to the details for more information",

@MikeMcC399
Copy link
Contributor Author

@PhilippNowak96

Missing space is already fixed with 1.11

Thank you for checking! Whilst I was writing this issue I had a nagging thought that I ought to check later branches, but since I had reported the problem in #1214 (comment) and there was no feedback there I thought that no action was being taken. Well I was wrong to make that assumption!

I have updated the issue description now accordingly.

@MikeMcC399
Copy link
Contributor Author

PR #2121 created.

@dsarkar dsarkar added the community Tag issues created by community members label Jan 17, 2021
@dsarkar dsarkar added the mirrored-to-jira This item is also tracked internally in JIRA label Jan 17, 2021
@dsarkar
Copy link
Member

dsarkar commented Jan 17, 2021

@MikeMcC399 Feedback: Quote:

"Translated text needs to be fixed by the translator not via community PR"

@MikeMcC399
Copy link
Contributor Author

@dsarkar

"Translated text needs to be fixed by the translator not via community PR"

This is not translated text, which would be in "https://github.com/corona-warn-app/cwa-app-android/tree/main/Corona-Warn-App/src/main/res/values[-language]/strings.xml".

These are hard-coded, non-translated, English-language-only error messages which are controlled by the software developers, not by the translation process. The texts are in .kt (kotlin) source files, not strings.xml files.

We can leave it to the developers to decide if they want to accept the PR #2121 or reject it.

@dsarkar
Copy link
Member

dsarkar commented Jan 17, 2021

@MikeMcC399

We can leave it to the developers to decide if they want to accept the PR #2121 or reject it.

Indeed. ;-)

@d4rken
Copy link
Member

d4rken commented Jan 18, 2021

Closed via #2121

@d4rken d4rken closed this as completed Jan 18, 2021
@dsarkar dsarkar added the Fix 1.11 Fix is planned for 1.11 label Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working community Tag issues created by community members Fix 1.11 Fix is planned for 1.11 mirrored-to-jira This item is also tracked internally in JIRA
Projects
None yet
Development

No branches or pull requests

5 participants