Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 428482

Summary: [server] email confirmation sends incorrect link
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: john.arthorne, ken_walker, markus.kell.r
Version: 5.0Flags: john.arthorne: review+
Target Milestone: 5.0 RC3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to fix the issue none

Description Anthony Hunter CLA 2014-02-18 14:50:14 EST
While testing the fix for Bug 428386 , I received emails with the content:

This email address has been registered for Orion user. To confirm please visit:
http://localhost:8080/useremailconfirmation/ahunterhunter?confirmationId=null

The value null is wrong, given the user has:
"email_confirmation": "1392751709400-0.47424924377719013".

As a result, when you navigate to the link, Orion says you have already been confirmed when in fact you are still blocked with an unconfirmed email address.
Comment 1 Anthony Hunter CLA 2014-02-18 14:52:28 EST
Created attachment 240085 [details]
Patch to fix the issue

Attached is a fix for review.
Comment 2 Anthony Hunter CLA 2014-02-19 13:42:12 EST
This is a mustfix for 5.0.

Once we migrate Orionbug to the new simple metadata storage format, the account creation will be broken because the notifications email link will be broken.
Comment 3 John Arthorne CLA 2014-02-19 16:35:03 EST
Looks good. We have two implementations of a credential storage service: one for old metadata format (SecureStorageCredentialsService) and one for new (SimpleUserCredentialsService). I can see that the old implementation does not have this bug and it looks like a simple error that was introduced while transcribing the code. It is quite an isolated fix so I think it is safe, and account creation with email validation after metadata migration will be completely broken if we don't fix it.
Comment 5 Markus Keller CLA 2014-06-10 11:26:42 EDT
The pmc_approved? request doesn't make sense; removed.