Results 1 to 6 of 6
  1. #1
    Newbie
    Join Date
    Nov 2011
    Posts
    5

    Question [BUG] error authenticating captive portal when password contains the British pound

    I have come across a slightly obscure error.

    When a user has the British pound symbol (ASCII 156 i believe) in their password, the captive portal crashes giving a python error (MOD_PYTHON ERROR)

    The error code is:
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 6: ordinal not in range(128)

    (Note position 6 was where I used the sign in the password for testing)

    Full error page below:

    Code:
    MOD_PYTHON ERROR
    
    ProcessId:      9359
    Interpreter:    'localhost'
    
    ServerName:     'localhost'
    DocumentRoot:   '/var/www/'
    
    URI:            '/capture/handler.py/authpost'
    Location:       '/capture'
    Directory:      None
    Filename:       '/usr/share/untangle/web/capture/handler.py'
    PathInfo:       '/authpost'
    
    Phase:          'PythonHandler'
    Handler:        'mod_python.publisher'
    
    Traceback (most recent call last):
    
      File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
        default=default_handler, arg=req, silent=hlist.silent)
    
      File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target
        result = _execute_target(config, req, object, arg)
    
      File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target
        result = object(arg)
    
      File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 213, in handler
        published = publish_object(req, object)
    
      File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 425, in publish_object
        return publish_object(req,util.apply_fs_data(object, req.form, req=req))
    
      File "/usr/lib/python2.5/site-packages/mod_python/util.py", line 554, in apply_fs_data
        return object(**args)
    
      File "/usr/share/untangle/web/capture/handler.py", line 82, in authpost
        authResult = captureNode.userAuthenticate(address, username, password)
    
      File "/usr/lib/python2.5/jsonrpc/proxy.py", line 62, in __call__
        postdata = dumps({"method": self.__serviceName, 'params': args, 'id': ServiceProxy.__request_id })
    
      File "/usr/lib/python2.5/jsonrpc/json.py", line 80, in dumps
        return unicode("".join([part for part in dumpParts (obj)]))
    
      File "/usr/lib/python2.5/jsonrpc/json.py", line 100, in dumpParts
        for part in dumpParts (value):
    
      File "/usr/lib/python2.5/jsonrpc/json.py", line 114, in dumpParts
        for part in dumpParts (item):
    
      File "/usr/lib/python2.5/jsonrpc/json.py", line 104, in dumpParts
        yield u'"' + StringEscapeRE.sub(escapeChar, obj) +u'"'
    
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 6: ordinal not in range(128)
    
    
    MODULE CACHE DETAILS
    
    Accessed:       Thu Feb 21 13:46:18 2013
    Generation:     3
    
    _mp_c987cf865de2aaf876a5e472306c64ad {
      FileName:     '/usr/share/untangle/web/capture/handler.py'
      Instance:     1
      Generation:   1
      Modified:     Thu Jan 31 16:58:06 2013
      Imported:     Mon Feb 18 07:22:08 2013

  2. #2
    Newbie
    Join Date
    Nov 2011
    Posts
    5

    Default

    I'm guessing this will occur with any 'extended' ascii number as the extended ascii set starts at 128.

    edit:
    From Microsoft web site passwords can contain:

    Uppercase characters of European languages (A through Z, with diacritic marks, Greek and Cyrillic characters)

    Lowercase characters of European languages (a through z, sharp-s, with diacritic marks, Greek and Cyrillic characters)

    Base 10 digits (0 through 9)

    Nonalphanumeric characters: ~!@#$%^&*_-+=`|\(){}[]:;"'<>,.?/

    Any Unicode character that is categorized as an alphabetic character but is not uppercase or lowercase. This includes Unicode characters from Asian languages.

    Is it feasible to extend the python script to support all of these, as anyone using active directory for authentication could theoretically need this.
    Last edited by random_noise; 02-21-2013 at 07:36 AM.

  3. #3
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    We will look into it, thanks.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  4. #4
    Untangler jcoffin's Avatar
    Join Date
    Aug 2008
    Location
    Sunnyvale, CA
    Posts
    9,107

    Default

    Thanks for reporting this issue. We have opened bug 10860.

    http://bugzilla.untangle.com/show_bug.cgi?id=10860
    Attention: Support and help on the Untangle Forums is provided by
    volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  5. #5
    Master Untangler
    Join Date
    Apr 2010
    Posts
    176

    Default

    Ohh and danish aswell ;-)

  6. #6
    Untangler jcoffin's Avatar
    Join Date
    Aug 2008
    Location
    Sunnyvale, CA
    Posts
    9,107

    Default

    Quote Originally Posted by MStauning View Post
    Ohh and danish aswell ;-)
    Yeah, any use of extended ascii characters in the login or password.
    Attention: Support and help on the Untangle Forums is provided by
    volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2