Skip to content

[Notifier] add caution to URL-encode special characters in Notifier DSNs #16863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions notifier.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ The notifier component supports the following channels:
SMS Channel
~~~~~~~~~~~

.. caution::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's about using an include to not duplicate the content?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged this "as is" because the repeated content is in a single doc page, so the fragment wouldn't be reused in other pages and it feels a bit "too much". Thanks!


If any of the DSN values contains any character considered special in a
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
:phpfunction:`urlencode` function to encode them.

The SMS channel uses :class:`Symfony\\Component\\Notifier\\Texter` classes
to send SMS messages to mobile phones. This feature requires subscribing to
a third-party service that sends SMS messages. Symfony provides integration
Expand Down Expand Up @@ -168,6 +175,13 @@ configure the ``texter_transports``:
Chat Channel
~~~~~~~~~~~~

.. caution::

If any of the DSN values contains any character considered special in a
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
:phpfunction:`urlencode` function to encode them.

The chat channel is used to send chat messages to users by using
:class:`Symfony\\Component\\Notifier\\Chatter` classes. Symfony provides
integration with these chat services:
Expand Down Expand Up @@ -328,6 +342,13 @@ notification emails:
Push Channel
~~~~~~~~~~~~

.. caution::

If any of the DSN values contains any character considered special in a
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
:phpfunction:`urlencode` function to encode them.

The push channel is used to send notifications to users by using
:class:`Symfony\\Component\\Notifier\\Texter` classes. Symfony provides
integration with these push services:
Expand Down Expand Up @@ -739,3 +760,5 @@ Learn more
:glob:

notifier/*

.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt