Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block postbacks for 5s after redirects #1853

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Conversation

exyi
Copy link
Member

@exyi exyi commented Sep 7, 2024

The page does not unload right after we perform
a navigation, and allows the user to hit the submit button a second time. In the past, we used to disable all postbacks after a redirect, but that also blocks the page after a file is returned. There probably isn't a 100% reliable way to detect if the location change is a navigation or a file return.

With this patch, we will block the page again, but only for a limited time (5 seconds). We also only only block the postback queue, which means that only postbacks with Concurrency=Deny or Queue will be affected.

Standard file returns as provided by DotVVM are
excluded from this, but it should also work acceptably with custom file returns (some buttons will not work for 5 seconds after the file return)

@exyi exyi added this to the Version 4.3 milestone Sep 7, 2024
The page does not unload right after we  perform
a navigation, and allows the user to hit the submit
button a second time. In the past, we used to disable
all postbacks after a redirect, but that also blocks
the page after a file is returned. There probably isn't
a 100% reliable way to detect if the location change
is a navigation or a file return.

With this patch, we will block the page again, but only
for a limited time (5 seconds). We also only only block
the postback queue, which means that only postbacks
with Concurrency=Deny or Queue will be affected.

Standard file returns as provided by DotVVM are
excluded from this, but it should also work acceptably
with custom file returns (some buttons will not work
for 5 seconds after the file return)
@tomasherceg tomasherceg merged commit 93b238f into main-v4 Sep 7, 2024
14 of 15 checks passed
@tomasherceg tomasherceg deleted the redirect-queue-block branch September 7, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants