Error in services (Yahoo Transport chatrooms)

Bug #178981 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Low
Mats

Bug Description

can't read "attr(category)": no such element in array
can't read "attr(category)": no such element in array
    while executing
"set category $attr(category)"
    ("identity" arm line 14)
    invoked from within
"switch -- [wrapper::gettag $c] {
     identity {

  # Each <identity/> element MUST possess 'category' and
  # 'type' attributes. (category/type)
 ..."
    (procedure "parse_get_info" line 18)
    invoked from within
"parse_get_info $jlibname $from $queryE"
    ("info" arm line 2)
    invoked from within
"switch -- $ditype {
     items {
  parse_get_items $jlibname $from $queryE
     }
     info {
  parse_get_info $jlibname $from $queryE
     }
 }"
    (procedure "::jlib::disco::send_get_cb" line 22)
    invoked from within
"::jlib::disco::send_get_cb info chat.yahoo.jaim.at {::Disco::InfoCB {}} ::jlib::jlib1 result {query {node 1600000002 xmlns http://jabber.org/protocol/..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $cmd [list $jlibname $type $subiq]"
    (procedure "::jlib::invoke_iq_callback" line 5)
    invoked from within
"::jlib::invoke_iq_callback ::jlib::jlib1 {::jlib::disco::send_get_cb info chat.yahoo.jaim.at {::Disco::InfoCB {}}} result {query {node 1600000002 xmln..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $iqcmd($id) [list result $subiq]"
    ("result" arm line 11)
    invoked from within
"switch -- $type {
 result {

     # Protect us from our own 'set' calls when we are awaiting
     # 'result' or 'error'.
     set setus 0
     i..."
    (procedure "iq_handler" line 56)
    invoked from within
"iq_handler $jlibname $xmldata"
    ("iq" arm line 2)
    invoked from within
"switch -- $tag {
 iq {
     iq_handler $jlibname $xmldata
 }
 message {
     message_handler $jlibname $xmldata
 }
 presence {
     presence_hand..."
    (procedure "::jlib::dispatcher" line 7)
    invoked from within
"::jlib::dispatcher ::jlib::jlib1 {iq {from chat.yahoo.jaim.at id 1044 type result to testing@e.kernelpanic.cc/Coccinella@computer-van-sander-devrieze}..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $wrapper($id,parsecmd) [list $wrapper($id,tree,2)]"
    (procedure "::wrapper::elementend" line 40)
    invoked from within
"::wrapper::elementend wrap1 iq -namespace http://jabber.org/protocol/disco#info"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $options(-elementendcommand) [list $tag] $empty $ns"
    invoked from within
"ParseEvent:ElementClose $tag [array get options]"
    invoked from within
"::sgml::parseEvent {{} {} {} {} iq {} { from='chat.yahoo.jaim.at' to='testing@e.kernelpanic.cc/Coccinella@computer-van-sander-devrieze' id='1044' type..."
    ("eval" body line 1)
    invoked from within
"eval ::sgml::parseEvent [list $tokenised] $parseOptions"
    (procedure "parse" line 60)
    invoked from within
"parse xmlparser12 {<iq from='chat.yahoo.jaim.at' to='testing@e.kernelpanic.cc/Coccinella@computer-van-sander-devrieze' id='1044' type='result'><query ..."
    (in namespace inscope "::xml::tclparser" script line 1)
    invoked from within
"::namespace inscope ::xml::tclparser parse xmlparser12 {<iq from='chat.yahoo.jaim.at' to='testing@e.kernelpanic.cc/Coccinella@computer-van-sander-devr..."
    ("eval" body line 1)
    invoked from within
"eval $classinfo(-parsecommand) [list $name] $args"
    ("parse" arm line 5)
    invoked from within
"switch -- $method {

 configure {
     # BUG: We're not checking for legal options
     array set data $args
     eval $classinfo(-configurecommand) [..."
    (procedure "::xml::ParserCmd" line 7)
    invoked from within
"::xml::ParserCmd xmlparser12 parse {<iq from='chat.yahoo.jaim.at' to='testing@e.kernelpanic.cc/Coccinella@computer-van-sander-devrieze' id='1044' type..."
    ("eval" body line 1)
    invoked from within
"eval ::xml::ParserCmd xmlparser12 [list $method] $args"
    (procedure "xmlparser12" line 1)
    invoked from within
"$p parse $xml"
    (procedure "parsereentrant" line 10)
    invoked from within
"parsereentrant $id $xml"
    (procedure "wrapper::parse" line 6)
    invoked from within
"wrapper::parse $lib(wrap) $data"
    (procedure "::jlib::recvsocket" line 24)
    invoked from within
"::jlib::recvsocket ::jlib::jlib1"

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
Revision history for this message
Mats (matsben) wrote :

Apparently a component which doesn't follow the rules since from XEP-0030: "Each <identity/> element MUST possess 'category' and 'type' attributes specifying the category and type for the entity, ..."
In any case I need to protect for this:

  # Protect for entities which don't follow the rules.
  if {![info exists attr(category)] || ![info exists attr(type)]} {
      continue
  }

Changed in coccinella:
status: New → Fix Committed
sander (s-devrieze)
Changed in coccinella:
importance: Undecided → Low
milestone: none → 0.96.4.1
sander (s-devrieze)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.