Changeset 813

Show
Ignore:
Timestamp:
08/13/08 12:45:35 (4 months ago)
Author:
kane
Message:

r6916@db-dev1: josboum | 2008-08-07 18:09:16 +0200

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/kane-hacking/DJabberd/lib/DJabberd/IQ.pm

    r812 r813  
    411411    my $username = $get->("username"); 
    412412    my $password = $get->("password"); 
    413     return $iq->send_error unless $username =~ /^\w+$/; 
     413 
     414    # XXX hack to make - supported as well, should implement full JID 
     415    # as outlined in the spec here: 
     416    #   http://www.xmpp.org/extensions/xep-0029.html#sect-id2252650 
     417    # Issue outlined on the mailinglist: 
     418    #   http://lists.danga.com/pipermail/djabberd/2008-August/000632.html 
     419    return $iq->send_error unless $username =~ /^[\w+-]$/; 
    414420    return $iq->send_error if $bjid && $bjid->node ne $username; 
    415421 
     
    459465 
    460466    # FIXME:  use nodeprep or whatever, not \w+ 
    461     $username = '' unless $username =~ /^\w+$/; 
    462  
     467    # XXX hack to make - supported as well, should implement full JID 
     468    # as outlined in the spec here: 
     469    #   http://www.xmpp.org/extensions/xep-0029.html#sect-id2252650 
     470    # Issue outlined on the mailinglist: 
     471    #   http://lists.danga.com/pipermail/djabberd/2008-August/000632.html 
     472    $username = '' unless $username =~ /^[\w+-]+$/; 
     473     
    463474    my $type = ($conn->vhost->are_hooks("GetPassword") || 
    464475                $conn->vhost->are_hooks("CheckDigest")) ? "<digest/>" : "<password/>"; 
     
    497508    # hanging in authentication state. We should at least send back 
    498509    # an error/reject of some sort --kane 
    499     return unless $username =~ /^\w+$/; 
    500  
     510    # XXX hack to make - supported as well, should implement full JID 
     511    # as outlined in the spec here: 
     512    #   http://www.xmpp.org/extensions/xep-0029.html#sect-id2252650 
     513    # Issue outlined on the mailinglist: 
     514    #   http://lists.danga.com/pipermail/djabberd/2008-August/000632.html 
     515    return unless $username =~ /^[\w+-]+$/; 
     516     
    501517    my $vhost = $conn->vhost; 
    502518