fix(NewAccount): remove extra params from the 'code' one

this shouldn't be a problem but some frameworks turn multiple params into an array (e.g. code=foo&code=bar => ['foo', 'bar']) and might refuse to process it
This commit is contained in:
Evangelos Paterakis 2023-02-12 23:13:56 +02:00
parent 28b3c9a647
commit 282f303124
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
1 changed files with 2 additions and 1 deletions

View File

@ -182,8 +182,9 @@ public class Tooth.Dialogs.NewAccount: Adw.Window {
var query = new Soup.URI (uri).get_query ();
var split = query.split ("=");
var code = split[1];
var code_clean = code.splice(code.index_of_char('&'), -1);
code_entry.text = code;
code_entry.text = code_clean;
is_working = false;
on_next_clicked ();
}