Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mielecloud] Less strict e-mail validation #10928

Merged

Conversation

BjoernLange
Copy link
Contributor

Fixes #10927.

Signed-off-by: Björn Lange [email protected]

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/miele-cloud-binding/93266/163

@Skinah Skinah added the bug An unexpected problem or unintended behavior of an add-on label Jul 4, 2021
@NonNullByDefault
public class EmailValidatorTest {
@ParameterizedTest
@ValueSource(strings = { "[email protected]", "[email protected]", "[email protected]" })
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add testcases for the actual changes in this PR, for example allowing capital letters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some further test cases regarding the minimum length and uppercase letters. However, the previously already present test cases checked the style of the addresses that were reported to be problematic, namely ones that have numbers and dashes. Also capital letters are part of Java's \w shortcut Pattern syntax, so nothing should have changed in that regard in the backend validation. The frontend validation differed from that and I decided that it would be easier to understand if the regex in front- and backend would be as similar as possible and thus replaced \w.

@BjoernLange BjoernLange force-pushed the 10927-mielecloud-less-strict-mail-validation branch from a7af07f to c1bf146 Compare July 7, 2021 17:53
@fwolter fwolter merged commit dbefba3 into openhab:main Jul 17, 2021
@fwolter fwolter added this to the 3.2 milestone Jul 17, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
* [mielecloud] Less strict e-mail validation

Signed-off-by: Björn Lange <[email protected]>

* Some more e-mail validation test cases

Signed-off-by: Björn Lange <[email protected]>

Co-authored-by: Björn Lange <[email protected]>
Signed-off-by: dw-8 <[email protected]>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
* [mielecloud] Less strict e-mail validation

Signed-off-by: Björn Lange <[email protected]>

* Some more e-mail validation test cases

Signed-off-by: Björn Lange <[email protected]>

Co-authored-by: Björn Lange <[email protected]>
Signed-off-by: dw-8 <[email protected]>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
* [mielecloud] Less strict e-mail validation

Signed-off-by: Björn Lange <[email protected]>

* Some more e-mail validation test cases

Signed-off-by: Björn Lange <[email protected]>

Co-authored-by: Björn Lange <[email protected]>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
* [mielecloud] Less strict e-mail validation

Signed-off-by: Björn Lange <[email protected]>

* Some more e-mail validation test cases

Signed-off-by: Björn Lange <[email protected]>

Co-authored-by: Björn Lange <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* [mielecloud] Less strict e-mail validation

Signed-off-by: Björn Lange <[email protected]>

* Some more e-mail validation test cases

Signed-off-by: Björn Lange <[email protected]>

Co-authored-by: Björn Lange <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mielecloud] E-mail validation is too strict
5 participants