#1557 mod_storage_internal: Traceback on query having 'start' or 'end' fields encountering item without 'when'

Reporter Zash
Owner Zash
Stars ★ (1)
  • Type-Defect
  • Priority-Medium
  • Milestone-0.12
  • Status-Fixed
  1. Zash on

    The archive implementation in mod_storage_internal grew out of the mod_offline format. This format lacked the 'when' and 'with' fields, instead having special attributes that carried the timestamp. Thus mod_storage_internal needs to handle this, but the 'start' and 'end' query parameters don't expect that Thus if a MAM module ever encounters an item without a 'with' field it throws a traceback because it tries to compare nil with a number.

  2. Zash on

    Traceback[c2s]: plugins/mod_storage_internal.lua:112: attempt to compare nil with number stack traceback: plugins/mod_storage_internal.lua:112: in function 'func' ./util/array.lua:97: in function <./util/array.lua:92> (...tail calls...) plugins/mod_storage_internal.lua:111: in function 'find' plugins/mod_muc_mam.lua:170: in function '?' ./util/events.lua:79: in function <./util/events.lua:75> Triggered by a bug in the new archive:get / :set API added in trunk and mod_muc_moderation, but could have happened if someone did queries over old offline messages for example.

    • owner Zash
    • tags Status-Started
  3. Zash on

    Fixed in https://hg.prosody.im/0.11/rev/8fcd46ee9bf5

    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.