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

Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to work with async functions. #16800

Merged
merged 2 commits into from May 20, 2023

Conversation

LomaxOnTheRun
Copy link
Contributor

Reference to #31949.

This PR makes the xframe_options_deny, xframe_options_sameorigin and xframe_options_exempt decorators able to handle both sync and async views.

@LomaxOnTheRun LomaxOnTheRun changed the title Refs #31949 -- Make @xframe_options_deny, @xframe_options_sameorigin and @xframe_options_exempt decorators work with async functions Refs #31949 -- Make @xframe_options_deny, @xframe_options_sameorigin and @xframe_options_exempt decorators work with async functions Apr 26, 2023
@LomaxOnTheRun LomaxOnTheRun force-pushed the async-clickjacking-view-decorators branch from c8c61e6 to b31de49 Compare April 26, 2023 06:21
docs/releases/5.0.txt Outdated Show resolved Hide resolved
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LomaxOnTheRun Thanks for the patch 👍 Do you have time to keep working on this?

tests/decorators/test_clickjacking.py Outdated Show resolved Hide resolved
django/views/decorators/clickjacking.py Outdated Show resolved Hide resolved
@felixxm felixxm changed the title Refs #31949 -- Make @xframe_options_deny, @xframe_options_sameorigin and @xframe_options_exempt decorators work with async functions Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to work with async functions. May 15, 2023
@felixxm
Copy link
Member

felixxm commented May 19, 2023

@LomaxOnTheRun Do you have time to keep working on this? If not I can push edits.

@LomaxOnTheRun LomaxOnTheRun force-pushed the async-clickjacking-view-decorators branch 2 times, most recently from df8b059 to 9da25e1 Compare May 19, 2023 10:41
@LomaxOnTheRun
Copy link
Contributor Author

@felixxm apologies for the delay, I'm currently on holiday and not looking at my laptop a whole lot, but I've just pushed up the changes you suggested (and thank you for pointing out why the references weren't working 😄). I'll check on this PR again in a few hours to make sure the tests are passing and I'm happy to keep a closer eye on it over the next few days, but I also won't take offence if you want to take over further edits for the sake of moving more quickly 🙂

@felixxm felixxm force-pushed the async-clickjacking-view-decorators branch from 93ebdae to 18aa618 Compare May 20, 2023 13:43
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LomaxOnTheRun Thanks 👍 I pushed final edits and reorganized commits.

@felixxm felixxm force-pushed the async-clickjacking-view-decorators branch from 18aa618 to 00f5d2d Compare May 20, 2023 13:52
@felixxm felixxm merged commit 00f5d2d into django:main May 20, 2023
26 checks passed
@felixxm felixxm temporarily deployed to schedules May 21, 2023 02:47 — with GitHub Actions Inactive
@felixxm felixxm temporarily deployed to schedules May 22, 2023 02:47 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants