Open aphex3k opened 1 year ago
Can't reproduce. I'd say that implementation can be improved but currently it works like this:
/
. You can prove that by entering a url with a non-existing device, like: http//:localhost:25441/devices/device/device_does_not_exist/
.So if you adjust the url for your umbrel, does it redirect to /
?
Here is how I can reproduce it reliably:
xpub6CtK6FS9iZp6HkRa8xHunR7CQrTSQKLNYpkjAuLhcgoSKFRpmoQVkgZBTV1319DdwyyZLKV7yLXFRbaMNwSB3Sq7vxu5uY4k5MkKEmCY8h8
test
The redirection seems to work for GET requests from http://umbrel.local:25441/devices/device/<arbitraty name for non-existent waller>/
to http://umbrel.local:25441/wallets/wallets_overview/
according to Chrome developer tools the redirect fails from a POST however...
General Headers
Request URL: http://umbrel.local:25441/devices/device/test/
Request Method: POST
Status Code: 302 FOUND
Remote Address: 192.168.1.233:25441
Referrer Policy: strict-origin-when-cross-origin
Response Headers
connection: keep-alive
content-length: 206
content-type: text/html; charset=utf-8
date: Fri, 20 Jan 2023 17:21:19 GMT
location
server: Werkzeug/2.0.0 Python/3.9.16
vary: Cookie
Request Headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cache-Control: max-age=0
Connection: keep-alive
Content-Length: 116
Content-Type: application/x-www-form-urlencoded
Cookie: <redacted>
Host: umbrel.local:25441
Origin: http://umbrel.local:25441
Referer: http://umbrel.local:25441/devices/device/test/?newdevice=true
Sec-GPC: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
It receives a 302 response. 303 is specifically used to redirect after a POST request so I believe the server should return a 303 instead of a 302.
I can't confirm that on a development environment with the tag v1.14.3
checked out. I get this flow which is what i described above:
My assumption is, that this is a misconfiguration on the umbrel side.
Whether this is a 303 or 302 shouldn't matter. A 302 is a temporary redirect whereas a 303 is a permanent redirect. It might make a difference from a SEO point of view but not whether this is treated correct or not. We even imho need to use 302 here as we want to be free to change the implementation anytime.
There is not really any logs that I can provide to further debug what is going on, are there?
I'd suggest to create an issue on the umbrel project and ask whether there proxy-config might have caused this. I can't reproduce it and it's very likely that it's a misconfiguration.
Describe the bug When removing a device from specter desktop, the redirection is not working properly.
To Reproduce Steps to reproduce the behavior:
Expected behavior The wallet should be remove and the user flow should not be interrupted.
Screenshots![image](https://user-images.githubusercontent.com/433270/212964097-763a2f0b-4e94-4eb6-88c7-dfdc7bf74cf7.png)
Desktop (please complete the following information):