<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chango.git/tests/logging_tests, branch devmain</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/chango.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chango.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/'/>
<updated>2026-05-13T21:00:56Z</updated>
<entry>
<title>Fixed #35514 -- Implemented dictionary-based MAILERS.</title>
<updated>2026-05-13T21:00:56Z</updated>
<author>
<name>Mike Edmunds</name>
<email>medmunds@gmail.com</email>
</author>
<published>2026-04-01T23:59:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=0f581cd29d42d1b5ed1dafb67794c2f3ce6705c9'/>
<id>urn:sha1:0f581cd29d42d1b5ed1dafb67794c2f3ce6705c9</id>
<content type='text'>
See DEP 0018.

Added:
* MAILERS setting.
* django.core.mail.mailers dict-like EmailBackend factory.
* `using` argument to mail sending APIs.
* `sent_using` attribute to mail.outbox messages in locmem backend.
* MAILERS in startproject settings template, set to console backend.
* AdminLogHandler.using argument.
* BrokenLinkEmailsMiddleware.send_mail() method.

Updated:
* BaseEmailBackend to track the MAILERS alias used to construct it, and
  to report errors for unknown kwargs (OPTIONS).
* EmailBackend implementations to initialize from kwargs (OPTIONS) only
  when MAILERS is being used.
* smtp.EmailBackend to require `host` option and to default `port`
  option based on SSL/TLS options.
* SimpleTestCase setup to substitute the locmem backend for all defined
  MAILERS configurations.
* Django's tests that send mail to define MAILERS.

Deprecated:
* EMAIL_BACKEND and other backend-related EMAIL_* settings.
* mail.get_connection().
* The `connection`, `fail_silently`, `auth_user`, and `auth_password`
  arguments to mail functions.
* The EmailMessage.connection attribute.
* BaseEmailBackend support for `fail_silently`. Backends that support
  fail_silently (SMTP, console, file) now implement it directly.
* AdminEmailHandler.email_backend argument.

Removed undocumented features without deprecation:
* EmailMessage.get_connection() method. (send() now raises an error if a
  subclass has attempted to override it.)
* EmailMessage.send() no longer sets self.connection to the connection
  used for sending. (It still _uses_ a pre-existing self.connection.)
* AdminEmailHandler.connection() method. (Init now raises an error if a
  subclass has attempted to override it.)

Thanks to Natalia Bidart for shepherding DEP 0018 and for extensive
reviews and suggestions on the implementation.

Thanks to Jacob Rief for the initial implementation and multiple
iterations while refining the design.

Co-authored-by: Jacob Rief &lt;jacob.rief@gmail.com&gt;
</content>
</entry>
<entry>
<title>Refs #35514 -- Cleaned up logging and middleware tests.</title>
<updated>2026-05-07T01:39:16Z</updated>
<author>
<name>Mike Edmunds</name>
<email>medmunds@gmail.com</email>
</author>
<published>2026-04-14T19:43:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=21dcd9a94fb3e9edeec883d12cd1dcac5e773abe'/>
<id>urn:sha1:21dcd9a94fb3e9edeec883d12cd1dcac5e773abe</id>
<content type='text'>
Simplified and removed use of soon-to-be-deprecated or removed features
from tests for AdminEmailHandler and BrokenLinkEmailsMiddleware. Added
or updated cases to ensure `fail_silently` usage remains consistent
during the transition to email providers.

Changed custom FailingEmailBackend to respect fail_silently and record
its use in a class-level property.

In AdminEmailHandlerTest:

* Added make_log_record() helper to reduce duplicated code.

* Changed test_fail_silently() to send through the FailingEmailBackend,
  which will fail if not initialized with fail_silently=True. (Rather
  than inspecting attributes of a soon-to-be-deprecated connection.)

* Simplified test_uses_custom_email_backend() by replacing monkeypatches
  with inspectable custom backend.

* In test_customize_send_mail_method(), removed use of the undocumented
  self.connection() method and the soon-to-be-deprecated `connection`
  arg to mail_managers(). This test verifies a subclass can customize
  sending by mailing the managers rather than the admins. Involving a
  email backend connection was irrelevant.

In BrokenLinkEmailsMiddlewareTest, added a case with FailingEmailBackend
to verify send uses fail_silently=True.
</content>
</entry>
<entry>
<title>Fixed #36958 -- Reloaded logging config when logging settings are changed in tests.</title>
<updated>2026-03-19T16:36:34Z</updated>
<author>
<name>SnippyCodes</name>
<email>aaryanparik124@gmail.com</email>
</author>
<published>2026-02-28T05:36:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=2d7f899deb2e3e58438a0703d6c3be4227641239'/>
<id>urn:sha1:2d7f899deb2e3e58438a0703d6c3be4227641239</id>
<content type='text'>
Thanks JaeHyuck Sa and Jake Howard for the reviews.
</content>
</entry>
<entry>
<title>Refs CVE-2025-48432 -- Made SuspiciousOperation logging use log_response() for consistency.</title>
<updated>2025-06-06T12:05:32Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2025-06-05T13:07:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=ff835f439cb1ecd8d74a24de12e3c03e5477dc9d'/>
<id>urn:sha1:ff835f439cb1ecd8d74a24de12e3c03e5477dc9d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactored logging_tests to reuse assertions for log records.</title>
<updated>2025-06-06T12:05:32Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2025-06-04T19:12:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=9d72e7daf7299ef1ece56fd657a02f77a469efe9'/>
<id>urn:sha1:9d72e7daf7299ef1ece56fd657a02f77a469efe9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed CVE-2025-48432 -- Escaped formatting arguments in `log_response()`.</title>
<updated>2025-06-04T11:33:30Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2025-05-20T18:29:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=a07ebec5591e233d8bbb38b7d63f35c5479eef0e'/>
<id>urn:sha1:a07ebec5591e233d8bbb38b7d63f35c5479eef0e</id>
<content type='text'>
Suitably crafted requests containing a CRLF sequence in the request
path may have allowed log injection, potentially corrupting log files,
obscuring other attacks, misleading log post-processing tools, or
forging log entries.

To mitigate this, all positional formatting arguments passed to the
logger are now escaped using "unicode_escape" encoding.

Thanks to Seokchan Yoon (https://ch4n3.kr/) for the report.

Co-authored-by: Carlton Gibson &lt;carlton@noumenal.es&gt;
Co-authored-by: Jake Howard &lt;git@theorangeone.net&gt;
</content>
</entry>
<entry>
<title>Added helpers in csrf_tests and logging_tests to assert logs from `log_response()`.</title>
<updated>2025-05-22T18:39:31Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2025-05-20T01:46:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=ad6f99889838ccc2c30b3c02ed3868c9b565e81b'/>
<id>urn:sha1:ad6f99889838ccc2c30b3c02ed3868c9b565e81b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #26688 -- Added tests for `log_response()` internal helper.</title>
<updated>2025-05-22T18:39:31Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2025-05-20T01:45:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=897046815944cc9a2da7ed9e8082f45ffe8110e3'/>
<id>urn:sha1:897046815944cc9a2da7ed9e8082f45ffe8110e3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #36138 -- Changed ADMINS and MANAGERS settings to lists of strings.</title>
<updated>2025-03-21T09:17:57Z</updated>
<author>
<name>Mike Edmunds</name>
<email>medmunds@gmail.com</email>
</author>
<published>2025-02-14T18:58:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=e295033144e3085abaf9277d1bb0a6436ce73e01'/>
<id>urn:sha1:e295033144e3085abaf9277d1bb0a6436ce73e01</id>
<content type='text'>
Previously, the ADMINS and MANAGERS settings were lists of (name, address)
tuples (where the name had been unused). Deprecated use of tuples.

Updated settings value sanity checks, and changed from ValueError to
ImproperlyConfigured.
</content>
</entry>
<entry>
<title>Fixed #35537 -- Changed EmailMessage.attachments and EmailMultiAlternatives.alternatives to use namedtuples.</title>
<updated>2024-06-20T07:43:40Z</updated>
<author>
<name>Jake Howard</name>
<email>git@theorangeone.net</email>
</author>
<published>2024-06-09T08:09:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=aba0e541caaa086f183197eaaca0ac20a730bbe4'/>
<id>urn:sha1:aba0e541caaa086f183197eaaca0ac20a730bbe4</id>
<content type='text'>
This makes it more descriptive to pull out the named fields.
</content>
</entry>
</feed>
