anonymous1184 / bitwarden-autotype

Bitwarden Auto-Type for Windows
Do What The F*ck You Want To Public License
181 stars 17 forks source link

json parsing failed #2

Closed Konecho closed 3 years ago

Konecho commented 4 years ago
---------------------------
bw-at.ahk
---------------------------
Error:  Expecting ',' delimiter or object closing '}': line 1 col 3944 (char 3944)

Specifically: n

    Line#
    290: isLogged := 1
    291: isLocked := 0
    294: parseItems()  
    297: TrayTip,atWTitle,Auto-Type ready,10,0x20
    298: }
    301: {
    304: items := bw("list items")
--->    305: items := Jxon_Load(items)
    307: atFields := []
    308: For i,item in items
    309: {
    311: if (item.type = 1)  
    312: {
    313: uri := item.login.uris[1].uri
    314: if (RegExMatch(uri, "^(win)?app://(.+)", match))  

The current thread will exit.
---------------------------

I don' know how to give useful feedback as items string directly contains all my passwords.

anonymous1184 commented 4 years ago

Hey there,

Just ran a few tests myself and seems stable to me. As you mention, is kinda hard to debug without the string itself, and since it contains the usernames and passwords no way in hell I'm asking for that.

I'm going out on a limb and call this an encoding issue. Do you have any Chinese/Japanese strings that might be breaking JSON parsing? If so, I'm gonna need to write myself a JSON parsing function since I'm using a 3rd party.

Konecho commented 4 years ago

Yes. I am using Chinese. When I add Msgbox, % SubStr(src, pos-10, 20) in line 463 (where error was thrown) and got me":"A宀?,"notes":nul, which should be me":"A岛","notes":nul.