Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15493 closed (fixed)

extras/csrf_migration_helper.py parsing improvement

Reported by: john Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords: CSRF
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

The extras/csrf_migration_helper.py script requires that the {% csrf_token %} template tag appear on the same line as the opening <form> tag.

This patch reworks the parsing to find the token anywhere within the form.

Attachments (1)

csrf_migration_helper_parsing.diff (2.1 KB) - added by john 5 years ago.
Patch to find the CSRF token anywhere in the form.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by john

Patch to find the CSRF token anywhere in the form.

comment:1 Changed 5 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

In [15647]:

Fixed #15493 - csrf_migration_helper.py parsing fix.

Thanks to 'john' for the patch.

comment:2 Changed 5 years ago by lukeplant

In [15648]:

[1.2.X] Fixed #15493 - csrf_migration_helper.py parsing fix.

Thanks to 'john' for the patch.

Backport of [15647] from trunk.

Note: See TracTickets for help on using tickets.
Back to Top