Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/authentication.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/authentication.py	(revision 6767)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/authentication.py	(revision 6768)
@@ -195,4 +195,8 @@
       with credentials set before)
 
+    - no session exists already
+
+    - password and repeated password do not match
+
     Therefore it is mandatory to put this plugin in the line of all
     credentials plugins _before_ other plugins, so that the regular
@@ -209,4 +213,5 @@
     loginfield = 'student_id'
     passwordfield = 'form.password'
+    repeatfield = 'form.password_repeat'
 
     def extractCredentials(self, request):
@@ -215,9 +220,19 @@
         login = request.get(self.loginfield, None)
         password = request.get(self.passwordfield, None)
+        password_repeat = request.get(self.repeatfield, None)
+
         if not login or not password:
             return None
+
+        if password != password_repeat:
+            # At least protect against erraneous password input
+            return None
+
         session = ISession(request)
         sessionData = session.get(
             'zope.pluggableauth.browserplugins')
+        if not sessionData:
+            return None
+
         old_credentials = sessionData.get('credentials', None)
         if old_credentials is None:
