coccinella crashes with user name 1 character long

Bug #179069 reported by michal hanula on 2007-12-28
2
Affects Status Importance Assigned to Milestone
Coccinella
High
Mats

Bug Description

I cannot log in with a user name 1 character long (my JID is f@7f000001.org). The relevant piece of code
(from jabber/Login.tcl):

    foreach name {server username password} {
        upvar 0 $name var
        if {[string length $var] <= 1} {
            set mcname [mc [string totitle $nsme]]
            ::UI::MessageBox -icon error -title [mc Error] -type ok \
              -message [mc jamessnamemissing $mcname]
            return
        }
        if {$name eq "password"} {
            continue
        }

        # This is just to check the validity!
        if {[catch {
            switch -- $name {
                server {
                    jlib::nameprep $var
                }
                username {
                    jlib::nodeprep $var
                }
            }
        } err]} {
            ::UI::MessageBox -icon error -title [mc Error] -type ok \
              -message [mc jamessillegalchar $name $var]
            return
        }
    }

<=1 should probably be changed to <1.
Moreover, there is a typo in
    set mcname [mc [string totitle $nsme]]
(nsme should be name)

sander (s-devrieze) wrote :

it does not crashed on Mac OS X, but there indeed is a bug:

can't read "nsme": no such variable
can't read "nsme": no such variable
    while executing
"string totitle $nsme"
    (procedure "::Login::DoLogin" line 30)
    invoked from within
"::Login::DoLogin"
    invoked from within
".jlogin.frall.f.b.btok invoke "
    invoked from within
".jlogin.frall.f.b.btok instate {pressed !disabled} { .jlogin.frall.f.b.btok state !pressed; .jlogin.frall.f.b.btok invoke } "
    (command bound to event)

test account is 6@e.kernelpanic.cc

PS@Mats: e.kernelpanic.cc is running ejabberd 2.0 beta1 which supports sevral new XEPs and XEP versions...so you might be interested in that server for testing purposes ;-)

Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → High
milestone: none → 0.96.4.1
michal hanula (f-7f000001) wrote :

Sorry, I was not yet fully awake when reporting the bug. I get an error message (same one), coccinella does not crash.

Mats (matsben) wrote :

Many thanks for this one. I was too conservative in my checks, and didn't check it myself...

Changed in coccinella:
status: New → Fix Committed
sander (s-devrieze) on 2008-01-09
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers