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

MF-1099 - Add email subdomain validator #1101

Merged
merged 4 commits into from
Apr 7, 2020
Merged

MF-1099 - Add email subdomain validator #1101

merged 4 commits into from
Apr 7, 2020

Conversation

manuio
Copy link
Contributor

@manuio manuio commented Apr 6, 2020

Signed-off-by: Manuel Imperiale [email protected]

Resolves #1099

@manuio manuio requested a review from a team as a code owner April 6, 2020 17:08
users/users.go Outdated
return false
}
domain, ext := hs[0], hs[1]

// Check subdomain and validate
if len(hs) == 3 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 3? Can there be multiple subdomains (I do not know, but theorethically stere can be sub-subdomain)?

Signed-off-by: Manuel Imperiale <[email protected]>
@codecov-io
Copy link

codecov-io commented Apr 6, 2020

Codecov Report

Merging #1101 into master will increase coverage by 0.00%.
The diff coverage is 90.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1101   +/-   ##
=======================================
  Coverage   77.10%   77.10%           
=======================================
  Files          95       95           
  Lines        6760     6769    +9     
=======================================
+ Hits         5212     5219    +7     
- Misses       1211     1213    +2     
  Partials      337      337           
Impacted Files Coverage Δ
users/users.go 80.48% <90.00%> (+5.48%) ⬆️
things/service.go 88.97% <0.00%> (-1.48%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8325c1c...e79b16b. Read the comment docs.

Signed-off-by: Manuel Imperiale <[email protected]>
drasko
drasko previously approved these changes Apr 6, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Manuel Imperiale <[email protected]>
@dborovcanin dborovcanin merged commit 382bc89 into absmach:master Apr 7, 2020
manuio added a commit that referenced this pull request Oct 12, 2020
* MF-1099 - Add email subdomain validator

Signed-off-by: Manuel Imperiale <[email protected]>

* Add unlimited sub domains

Signed-off-by: Manuel Imperiale <[email protected]>

* Fix users tests with error nil

Signed-off-by: Manuel Imperiale <[email protected]>

* Revert users test

Signed-off-by: Manuel Imperiale <[email protected]>
@manuio manuio deleted the email branch February 23, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't create user with sub-domain email address.
5 participants