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

[User management] Invalid email address keeps in textfield and no alert is shown #13503

Closed
SergioBertolinSG opened this issue Jan 20, 2015 · 8 comments

Comments

@SergioBertolinSG
Copy link
Contributor

Steps to reproduce

Using an administrator account:

  1. Go to the users view.
  2. Activate the checkbox about showing users email addresses.
  3. Write anything in the email fields (don't stroke return key).
  4. Click out of the textfield.

Expected behaviour

An alert is shown warning that email address isn't valid and textfield is deleted.

Actual behaviour

Wrong email address keeps in the textfield, it isn't erased and alert is not shown.

Server configuration

Operating system:
Ubuntu 14.04 LTS

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"8.0.0.1","versionstring":"8.0 alpha 1","edition":""}

Updated from an older ownCloud or fresh install:
fresh

List of activated apps:
none

The content of config/config.php:

Insert your config.php content here
(Without the database password and passwordsalt)

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: no

Client configuration

Browser:
Chrome, Firefox

screen shot 2015-01-20 at 12 31 15

@SergioBertolinSG
Copy link
Contributor Author

This merge #13519 has worsen this issue, now many invalid email addreses are accepted and stored in database.
cc @jnfrmarks

@Sugaroverdose
Copy link
Contributor

@SergioBertolinSG PR #13519 doesn't changes anything from perspective of this issue.
This issue was mentioned there only just because discussion context has switched to same problems.
Clearing fileds - not a good way to handle typos.

@MorrisJobke
Copy link
Contributor

@SergioBertolinSG The PR doesn't put invalid emails into the database. It is just wrongly shown. But this is another issue of just a temporary wrong info presented. I will have a look at this once I worked on the more critical stuff that is out there.

@SergioBertolinSG
Copy link
Contributor Author

I have to disagree, take a look to the oc_preferences table:
+--------+----------+-----------+------------------------+
| userid | appid | configkey | configvalue |
+--------+----------+-----------+------------------------+
| Mendo | settings | email | [email protected] |
| david | settings | email | aaaa@bbb |
| maria | core | timezone | America/New_York |
| maria | login | lastLogin | 1421942704 |
| maria | settings | email | [email protected] |
| pipi | settings | email | aaaa@bbb |
| tole | core | timezone | Europe/Berlin |
| tole | login | lastLogin | 1421947096 |
+--------+----------+-----------+------------------------+

@MorrisJobke
Copy link
Contributor

Okay. I didn't noticed that. I will have a look.

@MorrisJobke
Copy link
Contributor

@DeepDiver1975 I will maybe propose a fix for that and would like it in 8.0 because it seems there is a regression, but I first will test this.

@MorrisJobke MorrisJobke self-assigned this Jan 23, 2015
@Sugaroverdose
Copy link
Contributor

@MorrisJobke looks like phpmailer always uses 'pcre/pcre8' validation, which not so strict and doesn't requires to have dot in email address. Forcing 'php' validation fixes server-side part:
lib/private/mail.php line 133:

return PHPMailer::ValidateAddress($emailAddress, 'php');

but it doesn't supports international addresses -_- html5 validation regex also consider emails without dot as valid

@MorrisJobke
Copy link
Contributor

These are all valid email addresses https://en.wikipedia.org/wiki/Email_address#Domain_part (see linked RFC there - there are multiple in the text and also valid email addresses listed)

@MorrisJobke MorrisJobke removed their assignment Oct 5, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants