View Issue Details

IDProjectCategoryView StatusLast Update
5772Composrcore_cnspublic2024-07-25 22:19
ReporterMaster Rat Assigned ToChris Graham  
PrioritynormalSeveritytrivial 
Status assignedResolutionopen 
Product Version11.alpha4 
Summary5772: Too many emails upon logging in.
DescriptionWhen I first visit my site it sends an email the IP has not been validated before I even attempt to log in.
Afterwhich it sends another six after I login and told I need to validate. Now the problem comes I use the latest email to validate my IP
which if I click the link to the validation page to enter the code it is sending an additional 2 emails again before I input the code.

I am using PHP standard function email to process. Is this a bug or should I be using a direct connect to the server email outside of PHP?
TagsRoadmap: v11
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

PDStig

2024-05-20 15:24

administrator   ~8772

Can you share a screenshot of your email log? I'd like to see what all these emails are so I can figure out what's going on. Thank you!

Master Rat

2024-05-20 16:21

reporter   ~8773

Screen shots of email trail

Just Visited = equals I just went to the home page no login
After Login = I entered my login info
After Code = I entered the validation code and have now access.
After Code.png (23,807 bytes)   
After Code.png (23,807 bytes)   
After Login.png (22,201 bytes)   
After Login.png (22,201 bytes)   
Just visited.png (7,755 bytes)   
Just visited.png (7,755 bytes)   

Master Rat

2024-05-20 16:23

reporter   ~8774

What is strange is that I can just go to the home page and its triggering the validation routine automagically. I don't even try logging in it just starts firing off emails.

Master Rat

2024-05-20 16:25

reporter   ~8775

Also when you login and it gives notice that the IP must be verified it should forward to the screen to add the code or the email should apply the code to the URL when clicked would be more efficient I feel.

PDStig

2024-05-20 18:33

administrator   ~8776

Last edited: 2024-05-20 18:35

Seems like a bug. I'll look into it. What might be happening is Composr is creating a session, then triggering the error about IP validation, but not invalidating the session (or just not creating one to begin with). Thus you're still logged in and anything triggering a session check also triggers another IP verification.

PDStig

2024-05-22 02:22

administrator   ~8780

Master Rat, do you know if you had a login cookie in use / you used the remember me functionality?

PDStig

2024-05-22 02:49

administrator   ~8781

For time's sake since I am going out of town shortly, I went ahead and implemented what I think might be a fix:

https://gitlab.com/composr-foundation/composr/-/commit/9232721aef9a7ff3db25e55ae084294e12a32174

* Added cookie eating so Composr doesn't try logging in again with cookies
* Added a 1-hour grace period before sending another e-mail

admin

2024-05-22 17:29

administrator   ~8783

Last edited: 2024-05-22 17:29

Automated response: IP validation email sent multiple times

The IP needs validated e-mail gets sent multiple times.

This patch eats login cookies when IP needs validated and adds a 1-hour grace period, hopefully to reduce the number of e-mails.

You can apply the patch via the upgrader.php like you would a regular upgrade.

Master Rat

2024-06-04 12:58

reporter   ~8795

This issue still exists even after the patch.

PDStig

2024-06-04 15:22

administrator   ~8796

Last edited: 2024-06-04 15:24

Ugh, okay. I need more information then since I cannot reproduce the issue (I have this feature enabled on one of my v11 sites as well but I'm not getting repeat e-mails). There are a lot of questions that follow below. Please let me know if you need clarification or help on any of them. And please do NOT share your IP address in a comment despite my questions about IP addresses; I tried to ask them in such a way that you can answer them without exposing your IP address publicly.

You can also comment privately if you still feel like you don't want your answers to be public.

* What operating system are you using?
* What version PHP?
* What webserver + version?
* How are you logging in? Did you check "remember me" when logging in? Do the opposite and tell me if the issue persists.
* Does your IP address (when searching "what is my IP" in a search engine) match what is listed on your account profile?
* Check the database sessions table. Does there appear to be a new or updated session ID on every page load / each time you get the e-mail? If so, is the IP address changing? Does the IP match what the "what is my IP" search engine told you? Are there any asterisks (if so, treat them as wildcards)?

Master Rat

2024-06-04 20:28

reporter   ~8808

These I can answer right now:

PHP = Latest Version
Logging In = I tried both ways doesn't make a difference.
IP Address = Yes it changes but only when I shut down the computer does it change. Matches Yes at log in my IP is a match and remains.

I am out of town doing music sessions till Friday so the rest I will fill in then.

PDStig

2024-07-22 03:46

administrator   ~8856

Assigning to Chris. I cannot figure this one out; hopefully he can.

Add Note

View Status
Note
Upload Files
Maximum size: 32,768 KiB

Attach files by dragging & dropping, selecting or pasting them.
You are not logged in You are not logged in. This means you will not get any e-mail notifications. And if you reply, we will not know for sure you are the original poster of the issue.

Issue History

Date Modified Username Field Change
2024-05-20 14:59 Master Rat New Issue
2024-05-20 15:24 PDStig Note Added: 0008772
2024-05-20 16:21 Master Rat Note Added: 0008773
2024-05-20 16:21 Master Rat File Added: After Code.png
2024-05-20 16:21 Master Rat File Added: After Login.png
2024-05-20 16:21 Master Rat File Added: Just visited.png
2024-05-20 16:23 Master Rat Note Added: 0008774
2024-05-20 16:25 Master Rat Note Added: 0008775
2024-05-20 18:33 PDStig Note Added: 0008776
2024-05-20 18:34 PDStig Assigned To => user4172
2024-05-20 18:34 PDStig Status Not Assigned => Assigned
2024-05-20 18:35 PDStig Note Edited: 0008776
2024-05-22 02:22 PDStig Note Added: 0008780
2024-05-22 02:49 PDStig Note Added: 0008781
2024-05-22 17:29 PDStig Note Edited: 0008783
2024-06-04 12:58 Master Rat Note Added: 0008795
2024-06-04 15:22 PDStig Note Added: 0008796
2024-06-04 15:24 PDStig Note Edited: 0008796
2024-06-04 20:28 Master Rat Note Added: 0008808
2024-07-22 03:46 PDStig Assigned To user4172 => Chris Graham
2024-07-22 03:46 PDStig Note Added: 0008856
2024-07-25 22:19 Chris Graham Tag Attached: Roadmap: v11
2024-07-25 22:19 Chris Graham Summary To many emails upon logging in. => Too many emails upon logging in.