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

Contact diary person and place with more than 250 letters can be saved (EXPOSUREAPP-5400) #2476

Conversation

LukasLechnerDev
Copy link
Contributor

Testers reported that it was possible to store more than 250 characters for names of persons and locations in our contact diary.
This fix now sets a maxLength to the input fields so that users can't even add more than 250 characters and also trims the string again before writing to the database.

I also applied this 250 character restriction to the email + phone fields of persons and locations.

@LukasLechnerDev LukasLechnerDev added bug Something isn't working maintainers Tag pull requests created by maintainers prio PRs to review first. labels Feb 26, 2021
@LukasLechnerDev LukasLechnerDev added this to the 1.14.0 milestone Feb 26, 2021
@LukasLechnerDev LukasLechnerDev requested a review from a team February 26, 2021 09:13
…place-with-more-than-250-letters-can-be-saved
@BMItr BMItr self-assigned this Feb 26, 2021
…place-with-more-than-250-letters-can-be-saved
@ralfgehrer ralfgehrer self-assigned this Feb 26, 2021
…d-place-with-more-than-250-letters-can-be-saved' into fix/5400-Contact-diary-person-and-place-with-more-than-250-letters-can-be-saved
@LukasLechnerDev
Copy link
Contributor Author

LukasLechnerDev commented Feb 26, 2021

@SamuraiKek asked me to remove some unnecessary style items, see 👆

BMItr
BMItr previously approved these changes Feb 26, 2021
Copy link
Contributor

@BMItr BMItr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
tested on pixel 2 device

SamuraiKek
SamuraiKek previously approved these changes Feb 26, 2021
Copy link
Contributor

@SamuraiKek SamuraiKek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on Nokia 3 (Android 9). Tried by pasting randomly generated strings of 250 characters and then typing in more from the keyboard but couldn't.

…d-place-with-more-than-250-letters-can-be-saved' into fix/5400-Contact-diary-person-and-place-with-more-than-250-letters-can-be-saved
@LukasLechnerDev
Copy link
Contributor Author

Clarified the trim() topic with @ralfgehrer: All input values (name, phone and email) should allow leading and trailing whitespace.

I added another commit for that: 3f429aa

@sonarcloud
Copy link

sonarcloud bot commented Feb 26, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

60.0% 60.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@ralfgehrer ralfgehrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix. Tested on Pixel (Android 10)

@ralfgehrer ralfgehrer merged commit 2e9ff2d into release/1.14.x Feb 26, 2021
@ralfgehrer ralfgehrer deleted the fix/5400-Contact-diary-person-and-place-with-more-than-250-letters-can-be-saved branch February 26, 2021 14:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working maintainers Tag pull requests created by maintainers prio PRs to review first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants