Fix execute not to mangle the argument when it prompts for it
The argument is UTF-8. If it's missing, execute() gets it with
getstring(), which mangles non-ASCII characters. Clients reject
mangled file names for security reasons.
Fix by switching to ugetstring(). Missed in commit 69832255
, v4.3.11.
Non-ASCII characters are still mangled in ASCII sessions, but that's
not expected to work.
This commit is contained in:
parent
0493cbc655
commit
0bfdbfcbdd
1 changed files with 5 additions and 6 deletions
|
@ -242,18 +242,17 @@ make_stale_if_command_arg(char *arg)
|
||||||
int
|
int
|
||||||
execute(void)
|
execute(void)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024]; /* UTF-8 */
|
||||||
int failed;
|
int failed;
|
||||||
char *p;
|
char *p; /* UTF-8 */
|
||||||
char *redir; /* UTF-8 */
|
char *redir; /* UTF-8 */
|
||||||
char scanspace[1024];
|
char scanspace[1024];
|
||||||
|
|
||||||
failed = 0;
|
failed = 0;
|
||||||
|
|
||||||
if (player->comtail[1])
|
p = player->comtail[1];
|
||||||
p = player->comtail[1];
|
if (!p)
|
||||||
else
|
p = ugetstring("File? ", buf);
|
||||||
p = getstring("File? ", buf);
|
|
||||||
if (p == NULL || *p == '\0')
|
if (p == NULL || *p == '\0')
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
prexec(p);
|
prexec(p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue