Skip to content

Commit

Permalink
Fix some characters in the password breaking the command
Browse files Browse the repository at this point in the history
closes #80
  • Loading branch information
mmvanheusden committed Apr 13, 2023
1 parent 2943fe6 commit c945f90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ const createCommand = () => {
// if either the username or password fields are empty, anonymous login is used
let anonymous = username === "" || password === ""

// Allows enormous strings like &$搂"&$="搂$/"(搂NJUIDW>;!%?aQ52V?*['YsDnRy|(+Q 1h6BmnDQp,(Xr&Th _fMMm|*1T5a^HBuJr)EYKdA$~V*9N~74zg3hf9ZH(!HR"搂RH搂"H(R being used as password
password = password.replace(/"/g, "\"\"")

// build the username and password flags into one string, allowing for anonymous login
let userpass = anonymous ? "" : `-username ${username} -password ${password}`
let userpass = anonymous ? "" : `-username ${username} -password "${password}"`

const finalPath = platformpath() + path.sep + "games" + path.sep + appid

Expand Down

0 comments on commit c945f90

Please sign in to comment.