we need some code like this to clean up the URL and prevent other stupid code from crashing:
if(url.endsWith("/") {
url.chop(1); // chop last char off
}
The above code isn't perfect but will likely catch 99% of "slashitis" cases
we need some code like this to clean up the URL and prevent other stupid code from crashing:
```
if(url.endsWith("/") {
url.chop(1); // chop last char off
}
```
The above code isn't perfect but will likely catch 99% of "slashitis" cases
@jahway603 this bug still exists. To verify, I simply did Edit>Settings in my working + running SDL 1.5.0, and I added a single slash the current lite server it had randomly selected.
SDL instantly coredumped with these useful details:
getSettings
doRPCWithDefaultErrorHandling : "save"
doRPC : "save"
litelib_process_response : {
"result": "success"
}
"Dark" theme "Dark" has loaded
Animation dark loaded
Set animation
getSettings
doAutoConnect server= "https://lite.hush.community/"
Wallet exists: true
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/user/.cargo/git/checkouts/silentdragonlite-cli-13034352649a6f08/8535a11/lib/src/lightclient.rs:89:64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
I would say this bug has become less important to fix, since 1.5.0 autoselects from community servers, but it's still possible for somebody to put a slash by hand and get this shitty behavior.
The doAutoConnect() function needs to delete trailing slashes from sever URLs.
@jahway603 this bug still exists. To verify, I simply did Edit>Settings in my working + running SDL 1.5.0, and I added a single slash the current lite server it had randomly selected.
SDL instantly coredumped with these useful details:
```
getSettings
doRPCWithDefaultErrorHandling : "save"
doRPC : "save"
litelib_process_response : {
"result": "success"
}
"Dark" theme "Dark" has loaded
Animation dark loaded
Set animation
getSettings
doAutoConnect server= "https://lite.hush.community/"
Wallet exists: true
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/user/.cargo/git/checkouts/silentdragonlite-cli-13034352649a6f08/8535a11/lib/src/lightclient.rs:89:64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
```
I would say this bug has become less important to fix, since 1.5.0 autoselects from community servers, but it's still possible for somebody to put a slash by hand and get this shitty behavior.
The `doAutoConnect()` function needs to delete trailing slashes from sever URLs.
reported by user on TG and @onryo
we need some code like this to clean up the URL and prevent other stupid code from crashing:
The above code isn't perfect but will likely catch 99% of "slashitis" cases
@onryo @jahway603 any interest to work on this bug before the 1.4.1 comes out?
Do we know if this was resolved with SDL 1.5.0 release?
I can't tag @onryo to ask him if he is still having this issue... strange
@jahway603 this bug still exists. To verify, I simply did Edit>Settings in my working + running SDL 1.5.0, and I added a single slash the current lite server it had randomly selected.
SDL instantly coredumped with these useful details:
I would say this bug has become less important to fix, since 1.5.0 autoselects from community servers, but it's still possible for somebody to put a slash by hand and get this shitty behavior.
The
doAutoConnect()
function needs to delete trailing slashes from sever URLs.@jahway603 I just fixed this on the
dev
branch, give it a try if you wantNice! This fixes it.
This fix will be included in next SDL release, so I guess we can close this