-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix: revive always storing lowercased email addresses in AllConfig #53615
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
/backport to stable31 |
/backport to stable30 |
@@ -253,6 +253,10 @@ public function setUserValue($userId, $appName, $key, $value, $preCondition = nu | |||
} | |||
} | |||
|
|||
if ($appName === 'settings' && $key === 'email') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add to UserConfig as well as it otherwise simply breaks again.
I'd also suggest to change the existing or add another integration test to
server/build/integration/features/provisioning-v1.feature
Lines 128 to 142 in 6254354
And sending "PUT" to "/cloud/users/brand-new-user" with | |
| key | email | | |
| value | no-reply@nextcloud.com | | |
And the OCS status code should be "100" | |
And the HTTP status code should be "200" | |
And sending "PUT" to "/cloud/users/brand-new-user" with | |
| key | additional_mail | | |
| value | no.reply@nextcloud.com | | |
And the OCS status code should be "100" | |
And the HTTP status code should be "200" | |
And sending "PUT" to "/cloud/users/brand-new-user" with | |
| key | additional_mail | | |
| value | noreply@nextcloud.com | | |
And the OCS status code should be "100" | |
And the HTTP status code should be "200" |
which sets it as camel case and afterwards confirms it's lower case with:
server/build/integration/features/provisioning-v1.feature
Lines 163 to 171 in 6254354
Then user "brand-new-user" has | |
| id | brand-new-user | | |
| displayname | Brand New User | | |
| email | no-reply@nextcloud.com | | |
| additional_mail | no.reply@nextcloud.com;noreply@nextcloud.com | | |
| phone | +4971125242890 | | |
| address | Foo Bar Town | | |
| website | https://nextcloud.com | | |
| twitter | Nextcloud | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the entire if condition to UserConfig
or just duplicate it there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well if one place calls the other, the lower one needs to have it. if both write directly to DB, both need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically coming from the question, when UserConfig is started being used, will we have the same bug again
@nickvergessen might be cool to have: #53619 |
outbox
collection always returns3.7;Could not find principal
#50239 (comment)Summary
This fix was first implemented in #30197 but got lost.
Before: Mixed case emails (from LDAP) are saved as is in
oc_preferences
.After: Mixed case emails are saved in lowercase in
oc_preferences
.TODO
Checklist