Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 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 3 years ago.
Patch to find the CSRF token anywhere in the form.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by john

Patch to find the CSRF token anywhere in the form.

comment:1 Changed 3 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 3 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.