~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/security/views.py

  • Committer: William Grant
  • Date: 2010-02-25 07:34:50 UTC
  • Revision ID: grantw@unimelb.edu.au-20100225073450-zcl8ev5hlyhbszeu
Activate the Storm C extensions if possible. Moar speed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        fields = req.get_fieldstorage()
44
44
        nexturl = fields.getfirst('url')
45
45
 
 
46
        # XXX Warning that Internet Explorer is unsupported
 
47
        # Test if the user is in Internet Explorer
 
48
        try:
 
49
            useragent = req.headers_in['User-Agent']
 
50
            # A bit of very basic UA string detection
 
51
            ctx['msie'] = ('MSIE' in useragent
 
52
                           and 'AppleWebKit' not in useragent
 
53
                           and 'Gecko' not in useragent
 
54
                           and 'Opera' not in useragent)
 
55
        except KeyError:
 
56
            ctx['msie'] = False
 
57
 
46
58
        if nexturl is None:
47
59
            nexturl = '/'
48
60
 
101
113
                else:
102
114
                    user = None
103
115
                    try:
 
116
                        # Username is case insensitive
104
117
                        user = authenticate.authenticate(req.config, req.store,
105
 
                                    username.value, password.value)
 
118
                                    username.value.lower(), password.value)
106
119
                    except AuthError, msg:
107
120
                        badlogin = msg
108
121
                    if user is None: