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

feat: add max length check for email #1508

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

LashaJini
Copy link
Contributor

@LashaJini LashaJini commented Mar 29, 2024

What kind of change does this PR introduce?

feature: add max length check for email.

What is the current behavior?

Currently, email length is only checked on db side. Email has max length 255 characters, when user sends (>255 characters) large email to /admin/users endpoint, db is doing unnecessary queries.

Screenshot from 2024-03-30 02-40-54

What is the new behavior?

Code returns early if user enters large email. There will be no db queries.

Screenshot from 2024-03-30 02-44-31

@LashaJini LashaJini marked this pull request as ready for review March 29, 2024 23:03
@LashaJini LashaJini requested a review from a team as a code owner March 29, 2024 23:03
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8486361636

Details

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 65.12%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/mail.go 1 3 33.33%
Totals Coverage Status
Change from base Build 8482872008: -0.007%
Covered Lines: 8026
Relevant Lines: 12325

💛 - Coveralls

Copy link
Contributor

@hf hf left a comment

Choose a reason for hiding this comment

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

Thanks for catching this. I'll see if we can move the type without performance issues to text.

@hf hf merged commit f9c13c0 into supabase:master Jun 6, 2024
4 checks passed
J0 pushed a commit that referenced this pull request Jun 14, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.154.0](v2.153.0...v2.154.0)
(2024-06-12)


### Features

* add max length check for email
([#1508](#1508))
([f9c13c0](f9c13c0))
* add support for Slack OAuth V2
([#1591](#1591))
([bb99251](bb99251))
* encrypt sensitive columns
([#1593](#1593))
([e4a4758](e4a4758))
* upgrade otel to v1.26
([#1585](#1585))
([cdd13ad](cdd13ad))
* use largest avatar from spotify instead
([#1210](#1210))
([4f9994b](4f9994b)),
closes [#1209](#1209)


### Bug Fixes

* define search path in auth functions
([#1616](#1616))
([357bda2](357bda2))
* enable rls & update grants for auth tables
([#1617](#1617))
([28967aa](28967aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

feature: add max length check for email.

## What is the current behavior?

Currently, email length is only checked on db side. Email has max length
255 characters, when user sends (>255 characters) large email to
`/admin/users` endpoint, db is doing unnecessary queries.

![Screenshot from 2024-03-30
02-40-54](https://github.com/supabase/auth/assets/72510037/10a36b08-5112-4737-9c3a-b9e01c7ccc10)


## What is the new behavior?

Code returns early if user enters large email. There will be no db
queries.

![Screenshot from 2024-03-30
02-44-31](https://github.com/supabase/auth/assets/72510037/735a4e79-561f-412a-b536-6dac3aa6f339)
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.154.0](supabase/auth@v2.153.0...v2.154.0)
(2024-06-12)


### Features

* add max length check for email
([supabase#1508](supabase#1508))
([f9c13c0](supabase@f9c13c0))
* add support for Slack OAuth V2
([supabase#1591](supabase#1591))
([bb99251](supabase@bb99251))
* encrypt sensitive columns
([supabase#1593](supabase#1593))
([e4a4758](supabase@e4a4758))
* upgrade otel to v1.26
([supabase#1585](supabase#1585))
([cdd13ad](supabase@cdd13ad))
* use largest avatar from spotify instead
([supabase#1210](supabase#1210))
([4f9994b](supabase@4f9994b)),
closes [supabase#1209](supabase#1209)


### Bug Fixes

* define search path in auth functions
([supabase#1616](supabase#1616))
([357bda2](supabase@357bda2))
* enable rls & update grants for auth tables
([supabase#1617](supabase#1617))
([28967aa](supabase@28967aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
LashaJini added a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

feature: add max length check for email.

## What is the current behavior?

Currently, email length is only checked on db side. Email has max length
255 characters, when user sends (>255 characters) large email to
`/admin/users` endpoint, db is doing unnecessary queries.

![Screenshot from 2024-03-30
02-40-54](https://github.com/supabase/auth/assets/72510037/10a36b08-5112-4737-9c3a-b9e01c7ccc10)


## What is the new behavior?

Code returns early if user enters large email. There will be no db
queries.

![Screenshot from 2024-03-30
02-44-31](https://github.com/supabase/auth/assets/72510037/735a4e79-561f-412a-b536-6dac3aa6f339)
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.154.0](supabase/auth@v2.153.0...v2.154.0)
(2024-06-12)


### Features

* add max length check for email
([supabase#1508](supabase#1508))
([f9c13c0](supabase@f9c13c0))
* add support for Slack OAuth V2
([supabase#1591](supabase#1591))
([bb99251](supabase@bb99251))
* encrypt sensitive columns
([supabase#1593](supabase#1593))
([e4a4758](supabase@e4a4758))
* upgrade otel to v1.26
([supabase#1585](supabase#1585))
([cdd13ad](supabase@cdd13ad))
* use largest avatar from spotify instead
([supabase#1210](supabase#1210))
([4f9994b](supabase@4f9994b)),
closes [supabase#1209](supabase#1209)


### Bug Fixes

* define search path in auth functions
([supabase#1616](supabase#1616))
([357bda2](supabase@357bda2))
* enable rls & update grants for auth tables
([supabase#1617](supabase#1617))
([28967aa](supabase@28967aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
LashaJini added a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
## What kind of change does this PR introduce?

feature: add max length check for email.

## What is the current behavior?

Currently, email length is only checked on db side. Email has max length
255 characters, when user sends (>255 characters) large email to
`/admin/users` endpoint, db is doing unnecessary queries.

![Screenshot from 2024-03-30
02-40-54](https://github.com/supabase/auth/assets/72510037/10a36b08-5112-4737-9c3a-b9e01c7ccc10)


## What is the new behavior?

Code returns early if user enters large email. There will be no db
queries.

![Screenshot from 2024-03-30
02-44-31](https://github.com/supabase/auth/assets/72510037/735a4e79-561f-412a-b536-6dac3aa6f339)
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.154.0](supabase/auth@v2.153.0...v2.154.0)
(2024-06-12)


### Features

* add max length check for email
([supabase#1508](supabase#1508))
([f9c13c0](supabase@f9c13c0))
* add support for Slack OAuth V2
([supabase#1591](supabase#1591))
([bb99251](supabase@bb99251))
* encrypt sensitive columns
([supabase#1593](supabase#1593))
([e4a4758](supabase@e4a4758))
* upgrade otel to v1.26
([supabase#1585](supabase#1585))
([cdd13ad](supabase@cdd13ad))
* use largest avatar from spotify instead
([supabase#1210](supabase#1210))
([4f9994b](supabase@4f9994b)),
closes [supabase#1209](supabase#1209)


### Bug Fixes

* define search path in auth functions
([supabase#1616](supabase#1616))
([357bda2](supabase@357bda2))
* enable rls & update grants for auth tables
([supabase#1617](supabase#1617))
([28967aa](supabase@28967aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants