Open Viajaz opened 1 week ago
Hey @Viajaz - I've been a bit underwater. I'll take a look at this soon.
Let me know if I can provide more information. Sorry it's a bit light on details but, as far as I can tell, it seems to be just that simple to reproduce.
Just reproduced the error now:
# Logfile created on 2024-09-18 12:33:43 +0000 by logger.rb/v1.6.1
E, [2024-09-23T12:54:00.273596 #39] ERROR -- : [2b11ce46-9262-4883-927f-e1a7ae248ebe]
[2b11ce46-9262-4883-927f-e1a7ae248ebe] NoMethodError (undefined method `root_url' for an instance of PasswordsController):
[2b11ce46-9262-4883-927f-e1a7ae248ebe]
[2b11ce46-9262-4883-927f-e1a7ae248ebe] app/controllers/passwords_controller.rb:293:in `block (2 levels) in destroy'
[2b11ce46-9262-4883-927f-e1a7ae248ebe] app/controllers/passwords_controller.rb:292:in `destroy'
[2b11ce46-9262-4883-927f-e1a7ae248ebe] app/controllers/concerns/set_locale.rb:9:in `set_locale'
Fix released in v1.45.9 which is building now. Thanks @Viajaz!
I switched to :latest
for both containers and attempted to reproduce, unfortunately, still error 500 for me.
Confirmed in logs that pwpush-public-gateway
is running 1.45.9:
Password Pusher: migrating database to latest...
Password Pusher Version: 1.45.9
Password Pusher: precompiling assets for customisations...
Password Pusher Version: 1.45.9
@pglombardo
How are you deleting the push? Via API or UI?
It was the UI, however, when I went to perform another reproduction, and collect some more HTTP request details for you, the error is now gone. I don't have an explanation, it was the same test instance that I had used 8 hours before this post and I checked to ensure the version was the latest when posting last.
Regardless, I guess problem is fixed? @pglombardo
No I think you are right. There is another code path that can give this error. I need a better fix.
Hello,
Testing here, If I delete a push sended to a Public gateway, the page dont redirect to the page "you link expired", its runs eternal. BUT the link is deleted, if I refresh manually the page (press F5), the link was gone.
When a push is deleted/expired, if anonymous, you get redirected back to the "expired" page. If you are logged in and the push owner/creator, you get sent to the audit log.
Audit log doesn't exist on the public gateway. My theory is that the problem is somewhere in this redirect logic.
If you both test in an incognito window, does the problem still occur?
I'll get back on this soon.
When a push is deleted/expired, if anonymous, you get redirected back to the "expired" page. If you are logged in and the push owner/creator, you get sent to the audit log.
Audit log doesn't exist on the public gateway. My theory is that the problem is somewhere in this redirect logic.
If you both test in an incognito window, does the problem still occur?
I'll get back on this soon.
I have 2 enviroments here: DEV and PROD.
Only PROD is using the gateway.
Tested in DEV enviroment without public gateway and incognito mode in another browser:
Testing in PROD mode with public gateway and incognito mode in another browser:
Forget to say, I am not using audit mode nor login
There's an argument to be made about the need to even show a Delete button if this was the last view.
🐛 Bug Report
Deleting a password push that is already on it's last view will yield HTTP error 500 on
pglombardo/pwpush-public-gateway:stable
🔬 How To Reproduce
Steps to reproduce the behavior:
pglombardo/pwpush-public-gateway:stable
Environment
Where are you running/using Password Pusher?
If applicable, what version of Password Pusher?: 1.45.4
📈 Expected behavior
Probably "We apologize but this secret link has expired."