Skip to content

Commit 3752e27

Browse files
committed
minor #16863 [Notifier] add caution to URL-encode special characters in Notifier DSNs (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Notifier] add caution to URL-encode special characters in Notifier DSNs see symfony/symfony#46587 Commits ------- fbd9f39 add caution to URL-encode special characters in Notifier DSNs
2 parents a8bb802 + fbd9f39 commit 3752e27

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

notifier.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ The notifier component supports the following channels:
5151
SMS Channel
5252
~~~~~~~~~~~
5353

54+
.. caution::
55+
56+
If any of the DSN values contains any character considered special in a
57+
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
58+
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
59+
:phpfunction:`urlencode` function to encode them.
60+
5461
The SMS channel uses :class:`Symfony\\Component\\Notifier\\Texter` classes
5562
to send SMS messages to mobile phones. This feature requires subscribing to
5663
a third-party service that sends SMS messages. Symfony provides integration
@@ -168,6 +175,13 @@ configure the ``texter_transports``:
168175
Chat Channel
169176
~~~~~~~~~~~~
170177

178+
.. caution::
179+
180+
If any of the DSN values contains any character considered special in a
181+
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
182+
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
183+
:phpfunction:`urlencode` function to encode them.
184+
171185
The chat channel is used to send chat messages to users by using
172186
:class:`Symfony\\Component\\Notifier\\Chatter` classes. Symfony provides
173187
integration with these chat services:
@@ -328,6 +342,13 @@ notification emails:
328342
Push Channel
329343
~~~~~~~~~~~~
330344

345+
.. caution::
346+
347+
If any of the DSN values contains any character considered special in a
348+
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
349+
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
350+
:phpfunction:`urlencode` function to encode them.
351+
331352
The push channel is used to send notifications to users by using
332353
:class:`Symfony\\Component\\Notifier\\Texter` classes. Symfony provides
333354
integration with these push services:
@@ -739,3 +760,5 @@ Learn more
739760
:glob:
740761

741762
notifier/*
763+
764+
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt

0 commit comments

Comments
 (0)