From ad08d14a8560278855226cc5636d7c2859f16f92 Mon Sep 17 00:00:00 2001 From: 07SUJITH Date: Sun, 8 Jun 2025 23:21:16 +0530 Subject: [PATCH] fix: update logout logic to use POST method in all language READMEs (Django 4.1+) Replaced logout link with a POST form to comply with Django 4.1+ security policy, which disallows logout via GET request. Modified Files: - tutorial-extensions/en/authentication_authorization/README.md - tutorial-extensions/es/authentication_authorization/README.md - tutorial-extensions/fa/authentication_authorization/README.md - tutorial-extensions/ja/authentication_authorization/README.md - tutorial-extensions/co/authentication_authorization/README.md Fixes #183 --- en/authentication_authorization/README.md | 12 +++++++++++- es/authentication_authorization/README.md | 12 +++++++++++- fa/authentication_authorization/README.md | 12 +++++++++++- ja/authentication_authorization/README.md | 12 +++++++++++- ko/authentication_authorization/README.md | 12 +++++++++++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/en/authentication_authorization/README.md b/en/authentication_authorization/README.md index bb303a7..8d18714 100644 --- a/en/authentication_authorization/README.md +++ b/en/authentication_authorization/README.md @@ -141,7 +141,17 @@ Let's add some sugar to our templates while we're at it. First we will add some {% include './icons/file-earmark-plus.svg' %} {% include './icons/pencil-square.svg'%} -

Hello {{ user.username }} (Log out)

+

+ Hello {{ user.username }} + + (

+ {% csrf_token %} + + ) +
+

{% else %} {% include './icons/lock-fill.svg' %} {% endif %} diff --git a/es/authentication_authorization/README.md b/es/authentication_authorization/README.md index 695ff29..493ffe1 100644 --- a/es/authentication_authorization/README.md +++ b/es/authentication_authorization/README.md @@ -133,7 +133,17 @@ Vamos a agregarle algo de dulce a nuestras plantillas mientras estamos ahí. Pri {% if user.is_authenticated %} -

Hello {{ user.username }} (Log out)

+

+ Hello {{ user.username }} + + (

+ {% csrf_token %} + + ) +
+

{% else %} {% endif %} diff --git a/fa/authentication_authorization/README.md b/fa/authentication_authorization/README.md index 87e36af..d0162fe 100644 --- a/fa/authentication_authorization/README.md +++ b/fa/authentication_authorization/README.md @@ -134,7 +134,17 @@ LOGIN_REDIRECT_URL = '/' {% if user.is_authenticated %} -

Hello {{ user.username }} (Log out)

+

+ Hello {{ user.username }} + + (

+ {% csrf_token %} + + ) +
+

{% else %} {% endif %} diff --git a/ja/authentication_authorization/README.md b/ja/authentication_authorization/README.md index 8eec6b2..4a6323e 100644 --- a/ja/authentication_authorization/README.md +++ b/ja/authentication_authorization/README.md @@ -133,7 +133,17 @@ LOGIN_REDIRECT_URL = '/' {% if user.is_authenticated %} -

Hello {{ user.username }} (Log out)

+

+ Hello {{ user.username }} + + (

+ {% csrf_token %} + + ) +
+

{% else %} {% endif %} diff --git a/ko/authentication_authorization/README.md b/ko/authentication_authorization/README.md index 568acb1..c96d7ac 100644 --- a/ko/authentication_authorization/README.md +++ b/ko/authentication_authorization/README.md @@ -133,7 +133,17 @@ LOGIN_REDIRECT_URL = '/' {% if user.is_authenticated %} -

Hello {{ user.username }} (Log out)

+

+ Hello {{ user.username }} + + (

+ {% csrf_token %} + + ) +
+

{% else %} {% endif %}