#1874 shell: using backspace inside strings causes an error
Reporter
lissine
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Type-Defect
Status-New
lissine
on
What steps will reproduce the problem?
1. `sudo prosodyctl shell`
2. Type `module:show("s2s")` but when typing "s2s", make a typo and use backspace to reverse it.
3. Hit enter.
What is the expected output?
Normal output of `prosody> module:show("s2s")`
What do you see instead?
```
adminstream error Traceback[c2s]: /usr/local/lib/prosody/util/stanza.lua:65: invalid text value: contains invalid utf8
stack traceback:
[C]: in function 'error'
/usr/local/lib/prosody/util/stanza.lua:65: in upvalue 'check_text'
/usr/local/lib/prosody/util/stanza.lua:141: in method 'add_direct_child'
/usr/local/lib/prosody/util/stanza.lua:116: in method 'text'
/usr/local/lib/prosody/util/prosodyctl/shell.lua:30: in upvalue 'send_line'
/usr/local/lib/prosody/util/prosodyctl/shell.lua:44: in upvalue 'repl'
/usr/local/lib/prosody/util/prosodyctl/shell.lua:110: in field '?'
/usr/local/lib/prosody/util/events.lua:81: in function </usr/local/lib/prosody/util/events.lua:77>
(...tail calls...)
/usr/local/lib/prosody/util/adminstream.lua:293: in upvalue 'func'
/usr/local/lib/prosody/util/async.lua:144: in function </usr/local/lib/prosody/util/async.lua:142>
```
What version of the product are you using? On what operating system?
Using Prosody 0.12.4 on OpenBSD 7.5
Note: The issue might be non-reproducible on Linux.
What steps will reproduce the problem? 1. `sudo prosodyctl shell` 2. Type `module:show("s2s")` but when typing "s2s", make a typo and use backspace to reverse it. 3. Hit enter. What is the expected output? Normal output of `prosody> module:show("s2s")` What do you see instead? ``` adminstream error Traceback[c2s]: /usr/local/lib/prosody/util/stanza.lua:65: invalid text value: contains invalid utf8 stack traceback: [C]: in function 'error' /usr/local/lib/prosody/util/stanza.lua:65: in upvalue 'check_text' /usr/local/lib/prosody/util/stanza.lua:141: in method 'add_direct_child' /usr/local/lib/prosody/util/stanza.lua:116: in method 'text' /usr/local/lib/prosody/util/prosodyctl/shell.lua:30: in upvalue 'send_line' /usr/local/lib/prosody/util/prosodyctl/shell.lua:44: in upvalue 'repl' /usr/local/lib/prosody/util/prosodyctl/shell.lua:110: in field '?' /usr/local/lib/prosody/util/events.lua:81: in function </usr/local/lib/prosody/util/events.lua:77> (...tail calls...) /usr/local/lib/prosody/util/adminstream.lua:293: in upvalue 'func' /usr/local/lib/prosody/util/async.lua:144: in function </usr/local/lib/prosody/util/async.lua:142> ``` What version of the product are you using? On what operating system? Using Prosody 0.12.4 on OpenBSD 7.5 Note: The issue might be non-reproducible on Linux.
Additional information: $ prosodyctl about Prosody 0.12.4 # Prosody directories Data directory: /var/prosody Config directory: /etc/prosody Source directory: /usr/local/lib/prosody Plugin directories: /var/prosody/custom_plugins - not a directory! /usr/local/lib/prosody/modules/ # Operating system OpenBSD 7.5 # Lua environment Lua version: Lua 5.4 Lua module search paths: /usr/local/lib/prosody/?.lua /usr/local/share/lua/5.4/?.lua /usr/local/share/lua/5.4/?/init.lua /usr/local/lib/lua/5.4/?.lua /usr/local/lib/lua/5.4/?/init.lua /home/lis/.luarocks/share/lua/5.4/?.lua /home/lis/.luarocks/share/lua/5.4/?/init.lua /var/prosody/custom_plugins/share/lua/5.4/?.lua /var/prosody/custom_plugins/share/lua/5.4/?/init.lua Lua C module search paths: /usr/local/lib/prosody/?.so /usr/local/lib/lua/5.4/?.so /usr/local/lib/lua/5.4/loadall.so /home/lis/.luarocks/lib/lua/5.4/?.so LuaRocks: Installed (2.x+) # Network Backend: epoll # Lua module versions LuaDBI: 0.7 LuaExpat: 1.3.0 LuaFileSystem: 1.8.0 LuaSec: 1.2.0 LuaSocket: 3.1.0 luaunbound: 1.0.0 # library versions libcrypto: LibreSSL 3.9.0 libunbound: 1.19.1