Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1105

Hardening against uppercase characters in email addresses

    XMLWordPrintable

    Details

      Description

      Found two places where email addresses are not converted to lower case. This can cause problems with databases whose queries are case sensitive (PostgreSQL, Oracle). The best way I think is to convert them directly when reading the form values.

      This is the patch for EmailSendingForm:

      diff -r f425e397c1fd src/main/java/org/olat/registration/EmailSendingForm.java
      --- a/src/main/java/org/olat/registration/EmailSendingForm.java	Wed May 21 12:49:44 2014 +0200
      +++ b/src/main/java/org/olat/registration/EmailSendingForm.java	Tue Jun 17 10:51:50 2014 +0200
      @@ -71,7 +71,7 @@
       	}
       
       	protected String getEmailAddress() {
      -		return mail.getValue().trim();
      +		return mail.getValue().toLowerCase().trim();
       	}
       	
       	@Override
      

      org/olat/shibboleth/ShibbolethRegistrationWithEmailForm.java is also affected:

       	/**
       	 * 
       	 * @return E-mail field
       	 */
      -	protected String getEmail() { return eMail.getValue(); }
      +	protected String getEmail() { return eMail.getValue().toLowerCase().trim(); }
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Kirsten Scherer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m