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

Error emails to listmaster from repeated set_netidtoemail_db calls #1163

Closed
dpc22 opened this issue Apr 28, 2021 · 6 comments · Fixed by #1173
Closed

Error emails to listmaster from repeated set_netidtoemail_db calls #1163

dpc22 opened this issue Apr 28, 2021 · 6 comments · Fixed by #1173
Labels
Milestone

Comments

@dpc22
Copy link
Contributor

dpc22 commented Apr 28, 2021

Version

6.2.62

Installation method

My own rpm, derived from "official" source RPM for RHEL 7.

Expected behavior

We have SSO (Shibboleth) enabled for our Sympa installation. This should not generate spurious emails to listmaster of the form:

(Web interface - ACTION: Command process):

db_update_failed

See the logs for more details.

Actual behavior

Once in a while someone manages to generate two separate confirmmail emails with different ticket numbers when attempting to create a new account on Sympa. I infer that they are either looking at the same page in two different browers or (more likely) opening links in new browser tabs:

XX.XX.XX.XX - XXX [27/Apr/2021:17:55:39 +0100] "GET /sympa/sso_login/ucam_federation/validateemail/XXX%40cam.ac.uk HTTP/1.1" 200 9923 "https://lists.cam.ac.uk/sympa/sso_login/ucam_federation/init" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"
XX.XX.XX.XX - XXX [27/Apr/2021:17:56:26 +0100] "GET /sympa/sso_login/ucam_federation/validateemail/XXX%40cam.ac.uk HTTP/1.1" 200 10102 "https://lists.cam.ac.uk/sympa/sso_login/ucam_federation/init" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"

If they click on both confirmemail links:

XX.XX.XX.XX - XXX [27/Apr/2021:17:56:03 +0100] "GET /sympa/sso_login/ucam_federation/confirmemail/XXX%40cam.ac.uk/20685874072473 HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"
XX.XX.XX.XX - XXX [27/Apr/2021:17:56:40 +0100] "GET /sympa/sso_login/ucam_federation/confirmemail/XXX%40cam.ac.uk/31585752071920 HTTP/1.1" 200 11350 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"

listmaster receives an error email as indicated above. The Sympa logs reveal:

> main::do_sso_login#3568 
> Sympa::Robot::set_netidtoemail_db#130 Unable to set email address [email protected] in netidmap_table for id XXX, service ucam_federation, robot lists.cam.ac.uk

The user also sees an error in wwsympa but everything works fine if they just try to log in with the newly created account.

Additional information

This would appear to be down to lib/Sympa/Robot.pm set_netidtoemail_db (or something calling that function) failing to check whether a row already exists in the netidmap_table. Replacing:

            'err',
            'Unable to set email address %s in netidmap_table for id %s, service %s, robot %s',

with:

            'info',
            'Unable to set email address %s in netidmap_table for id %s, service %s, robot %s',

would presumably stop the noise to listmaster, but the error would still be there.

@ikedas ikedas added the bug label Apr 28, 2021
@ikedas ikedas added this to the 6.2.64 milestone Apr 29, 2021
@ikedas
Copy link
Member

ikedas commented May 14, 2021

@dpc22 , could you please let us know what RDBMS are you using?

@dpc22
Copy link
Contributor Author

dpc22 commented May 14, 2021

PostgreSQL.

Specifically postgresql-9.2.24-4.el7_8.x86_64, which is what RHEL 7 provides right now.

@ikedas
Copy link
Member

ikedas commented May 15, 2021

@dpc22, could you please check this patch ? Thank you.

@dpc22
Copy link
Contributor Author

dpc22 commented May 17, 2021

Yes, I think that has fixed it. Thanks.

@dpc22 dpc22 closed this as completed May 17, 2021
@dpc22
Copy link
Contributor Author

dpc22 commented May 17, 2021

Oops: clicked the wrong button and closed the ticket before the patch was committed

@dpc22 dpc22 reopened this May 17, 2021
ikedas added a commit that referenced this issue May 17, 2021
Error emails to listmaster from repeated set_netidtoemail_db calls (#1163)
@ikedas
Copy link
Member

ikedas commented May 17, 2021

@dpc22, thank you for reporting bug and confirming fixes!

ikedas added a commit to ikedas/sympa that referenced this issue Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants