Debian Codegraph @

docs/changes.rst

raw
1 Changes
2 =======
3
4 Version 1.3.0
5 -------------
6
7 Released 2026-04-23
8
9 - Don't read the whole uploaded files to know their size. :pr:`635`
10 - Stop support for Python 3.9. Start support for Python 3.14. :pr:`648`
11 - Migrate the project to uv. :pr:`649`
12 - Allow setting a ``nonce`` on :class:`~flask_wtf.recaptcha.RecaptchaField`
13 (string or zero-argument callable) for nonce-based Content Security
14 Policies. :pr:`312`
15 - Add ``csrf_meta_tag()`` helper and ``WTF_CSRF_META_NAME`` setting to render
16 the CSRF token as an HTML ``<meta>`` tag.
17 - Forward keyword arguments passed to the reCAPTCHA widget as HTML attributes
18 on the captcha ``<div>``, with the field id used as a default ``id``.
19 :pr:`353`
20 - Add ``apply_exemptions`` parameter to
21 :meth:`~flask_wtf.csrf.CSRFProtect.protect` so ``@csrf.exempt`` keeps working
22 when validation is triggered manually. :pr:`419`
23 - Add ``RECAPTCHA_ENABLED`` setting. :pr:`509`
24
25 Version 1.2.2
26 -------------
27
28 Released 2024-10-20
29
30 - Move the project to the pallets-eco organization. :pr:`602`
31 - Stop support for Python 3.8. Start support for Python 3.13. :pr:`603`
32
33 Version 1.2.1
34 -------------
35
36 Released 2023-10-02
37
38 - Fix a bug introduced with :pr:`556` where file validators were editing
39 the file fields content. :pr:`578`
40
41 Version 1.2.0
42 -------------
43
44 Released 2023-10-01
45
46 - Add field ``MultipleFileField``. ``FileRequired``, ``FileAllowed``, ``FileSize``
47 now can be used to validate multiple files :pr:`556` :issue:`338`
48
49 Version 1.1.2
50 -------------
51
52 Released 2023-09-29
53
54 - Fixed Flask 2.3 deprecations of ``werkzeug.urls.url_encode`` and
55 ``flask.Markup`` :pr:`565` :issue:`561`
56 - Stop support for python 3.7 :pr:`574`
57 - Use `pyproject.toml` instead of `setup.cfg` :pr:`576`
58 - Fixed nested blueprint CSRF exemption :pr:`572`
59
60 Version 1.1.1
61 -------------
62
63 Released 2023-01-17
64
65 - Fixed `validate` `extra_validators` parameter. :pr:`548`
66
67 Version 1.1.0
68 -------------
69
70 Released 2023-01-15
71
72 - Drop support for Python 3.6.
73 - ``validate_on_submit`` takes a ``extra_validators`` parameters :pr:`479`
74 - Stop supporting Flask-Babelex :pr:`540`
75 - Support for python 3.11 :pr:`542`
76 - Remove unused call to `JSONEncoder` :pr:`536`
77
78 Version 1.0.1
79 -------------
80
81 Released 2022-03-31
82
83 - Update compatibility with the latest Werkzeug release. :issue:`511`
84
85
86 Version 1.0.0
87 --------------
88
89 Released 2021-11-07
90
91 - Deprecated items removal :pr:`484`
92 - Support for alternatives captcha services :pr:`425` :pr:`342`
93 :pr:`387` :issue:`384`
94
95 Version 0.15.1
96 --------------
97
98 Released 2021-05-25
99
100 - Add ``python_requires`` metadata to avoid installing on unsupported
101 Python versions. :pr:`442`
102
103
104 Version 0.15.0
105 --------------
106
107 Released 2021-05-24
108
109 - Drop support for Python < 3.6. :pr:`416`
110 - ``FileSize`` validator. :pr:`307, 365`
111 - Extra requirement ``email`` installs the ``email_validator``
112 package. :pr:`423`
113 - Fixed Flask 2.0 warnings. :pr:`434`
114 - Various documentation fixes. :pr:`315, 321, 335, 344, 386, 400`,
115 :pr:`404, 420, 437`
116 - Various CI fixes. :pr:`405, 438`
117
118
119 Version 0.14.3
120 --------------
121
122 Released 2020-02-06
123
124 - Fix deprecated imports from ``werkzeug`` and ``collections``.
125
126
127 Version 0.14.2
128 --------------
129
130 Released 2017-01-10
131
132 - Fix bug where ``FlaskForm`` assumed ``meta`` argument was not
133 ``None`` if it was passed. :issue:`278`
134
135
136 Version 0.14.1
137 --------------
138
139 Released 2017-01-10
140
141 - Fix bug where the file validators would incorrectly identify an
142 empty file as valid data. :issue:`276`, :pr:`277`
143
144 - ``FileField`` is no longer deprecated. The data is checked
145 during processing and only set if it's a valid file.
146 - ``has_file`` *is* deprecated; it's now equivalent to
147 ``bool(field.data)``.
148 - ``FileRequired`` and ``FileAllowed`` work with both the
149 Flask-WTF and WTForms ``FileField`` classes.
150 - The ``Optional`` validator now works with ``FileField``.
151
152
153 Version 0.14
154 ------------
155
156 Released 2017-01-06
157
158 - Use ItsDangerous to sign CSRF tokens and check expiration instead of
159 doing it ourselves. :issue:`264`
160
161 - All tokens are URL safe, removing the ``url_safe`` parameter
162 from ``generate_csrf``. :issue:`206`
163 - All tokens store a timestamp, which is checked in
164 ``validate_csrf``. The ``time_limit`` parameter of
165 ``generate_csrf`` is removed.
166
167 - Remove the ``app`` attribute from ``CsrfProtect``, use
168 ``current_app``. :issue:`264`
169 - ``CsrfProtect`` protects the ``DELETE`` method by default.
170 :issue:`264`
171 - The same CSRF token is generated for the lifetime of a request. It
172 is exposed as ``g.csrf_token`` for use during testing.
173 :issue:`227, 264`
174 - ``CsrfProtect.error_handler`` is deprecated. :issue:`264`
175
176 - Handlers that return a response work in addition to those that
177 raise an error. The behavior was not clear in previous docs.
178 - :issue:`200, 209, 243, 252`
179
180 - Use ``Form.Meta`` instead of deprecated ``SecureForm`` for CSRF (and
181 everything else). :issue:`216, 271`
182
183 - ``csrf_enabled`` parameter is still recognized but deprecated.
184 All other attributes and methods from ``SecureForm`` are
185 removed. :issue:`271`
186
187 - Provide ``WTF_CSRF_FIELD_NAME`` to configure the name of the CSRF
188 token. :issue:`271`
189 - ``validate_csrf`` raises ``wtforms.ValidationError`` with specific
190 messages instead of returning ``True`` or ``False``. This breaks
191 anything that was calling the method directly. :issue:`239, 271`
192
193 - CSRF errors are logged as well as raised. :issue:`239`
194
195 - ``CsrfProtect`` is renamed to ``CSRFProtect``. A deprecation warning
196 is issued when using the old name. ``CsrfError`` is renamed to
197 ``CSRFError`` without deprecation. :issue:`271`
198 - ``FileField`` is deprecated because it no longer provides
199 functionality over the provided validators. Use
200 ``wtforms.FileField`` directly. :issue:`272`
201
202
203 Version 0.13.1
204 --------------
205
206 Released 2016-10-6
207
208 - Deprecation warning for ``Form`` is shown during ``__init__``
209 instead of immediately when subclassing. :issue:`262`
210 - Don't use ``pkg_resources`` to get version, for compatibility with
211 GAE. :issue:`261`
212
213
214 Version 0.13
215 ------------
216
217 Released 2016-09-29
218
219 - ``Form`` is renamed to ``FlaskForm`` in order to avoid name
220 collision with WTForms's base class. Using ``Form`` will show a
221 deprecation warning. :issue:`250`
222 - ``hidden_tag`` no longer wraps the hidden inputs in a hidden div.
223 This is valid HTML5 and any modern HTML parser will behave
224 correctly. :issue:`193, 217`
225 - ``flask_wtf.html5`` is deprecated. Import directly from
226 ``wtforms.fields.html5``. :issue:`251`
227 - ``is_submitted`` is true for ``PATCH`` and ``DELETE`` in addition to
228 ``POST`` and ``PUT``. :issue:`187`
229 - ``generate_csrf`` takes a ``token_key`` parameter to specify the key
230 stored in the session. :issue:`206`
231 - ``generate_csrf`` takes a ``url_safe`` parameter to allow the token
232 to be used in URLs. :issue:`206`
233 - ``form.data`` can be accessed multiple times without raising an
234 exception. :issue:`248`
235 - File extension with multiple parts (``.tar.gz``) can be used in the
236 ``FileAllowed`` validator. :issue:`201`
237
238
239 Version 0.12
240 ------------
241
242 Released 2015-07-09
243
244 - Abstract ``protect_csrf()`` into a separate method.
245 - Update reCAPTCHA configuration.
246 - Fix reCAPTCHA error handle.
247
248
249 Version 0.11
250 ------------
251
252 Released 2015-01-21
253
254 - Use the new reCAPTCHA API. :pr:`164`
255
256
257 Version 0.10.3
258 --------------
259
260 Released 2014-11-16
261
262 - Add configuration: ``WTF_CSRF_HEADERS``. :pr:`159`
263 - Support customize hidden tags. :pr:`150`
264 - And many more bug fixes.
265
266
267 Version 0.10.2
268 --------------
269
270 Released 2014-09-03
271
272 - Update translation for reCaptcha. :pr:`146`
273
274
275 Version 0.10.1
276 --------------
277
278 Released 2014-08-26
279
280 - Update ``RECAPTCHA_API_SERVER_URL``. :pr:`145`
281 - Update requirement Werkzeug >= 0.9.5.
282 - Fix ``CsrfProtect`` exempt for blueprints. :pr:`143`
283
284
285 Version 0.10.0
286 --------------
287
288 Released 2014-07-16
289
290 - Add configuration: ``WTF_CSRF_METHODS``.
291 - Support WTForms 2.0 now.
292 - Fix CSRF validation without time limit (``time_limit=False``).
293 - ``csrf_exempt`` supports blueprint. :issue:`111`
294
295
296 Version 0.9.5
297 -------------
298
299 Released 2014-03-21
300
301 - ``csrf_token`` for all template types. :pr:`112`
302 - Make ``FileRequired`` a subclass of ``InputRequired``. :pr:`108`
303
304
305 Version 0.9.4
306 -------------
307
308 Released 2013-12-20
309
310 - Bugfix for ``csrf`` module when form has a prefix.
311 - Compatible support for WTForms 2.
312 - Remove file API for ``FileField``
313
314
315 Version 0.9.3
316 -------------
317
318 Released 2013-10-02
319
320 - Fix validation of recaptcha when app in testing mode. :pr:`89`
321 - Bugfix for ``csrf`` module. :pr:`91`
322
323
324 Version 0.9.2
325 -------------
326
327 Released 2013-09-11
328
329 - Upgrade WTForms to 1.0.5.
330 - No lazy string for i18n. :issue:`77`
331 - No ``DateInput`` widget in HTML5. :issue:`81`
332 - ``PUT`` and ``PATCH`` for CSRF. :issue:`86`
333
334
335 Version 0.9.1
336 -------------
337
338 Released 2013-08-21
339
340 - Compatibility with Flask < 0.10. :issue:`82`
341
342
343 Version 0.9.0
344 -------------
345
346 Released 2013-08-15
347
348 - Add i18n support. :issue:`65`
349 - Use default HTML5 widgets and fields provided by WTForms.
350 - Python 3.3+ support.
351 - Redesign form, replace ``SessionSecureForm``.
352 - CSRF protection solution.
353 - Drop WTForms imports.
354 - Fix recaptcha i18n support.
355 - Fix recaptcha validator for Python 3.
356 - More test cases, it's 90%+ coverage now.
357 - Redesign documentation.
358
359
360 Version 0.8.4
361 -------------
362
363 Released 2013-03-28
364
365 - Recaptcha Validator now returns provided message. :issue:`66`
366 - Minor doc fixes.
367 - Fixed issue with tests barking because of nose/multiprocessing
368 issue.
369
370
371 Version 0.8.3
372 -------------
373
374 Released 2013-03-13
375
376 - Update documentation to indicate pending deprecation of WTForms
377 namespace facade.
378 - PEP8 fixes. :issue:`64`
379 - Fix Recaptcha widget. :issue:`49`
380
381
382 Version 0.8.2 and prior
383 -----------------------
384
385 Initial development by Dan Jacob and Ron Duplain.