Overview
SHA1:9988714b79a4703e1c022422b0daaaa6ade237c7
Date: 2018-07-31 13:33:40
User: bohwaz
Comment:Vérifier qu'une adresse email est valide en utilisant la bonne méthode de \KD2\SMTP, fix bug avec les adresses contenant de l'unicode
Timelines: family | ancestors | descendants | both | trunk | stable
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2018-08-01
00:18
[0c5fe2cf61] Corrige return-path si FORCE_EMAIL_FROM est défini (user: bohwaz, tags: trunk, stable)
2018-07-31
13:33
[9988714b79] Vérifier qu'une adresse email est valide en utilisant la bonne méthode de \KD2\SMTP, fix bug avec les adresses contenant de l'unicode (user: bohwaz, tags: trunk, stable)
2018-07-30
22:14
[6be889885a] Fix namespace de constante (user: bohwaz, tags: trunk, stable)
Changes

Modified src/include/lib/Garradin/Config.php from [14cb7536d2] to [868d015351].

1
2
3
4


5
6
7
8
9
10
11
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<?php

namespace Garradin;



class Config
{
    protected $fields_types = null;
    protected $config = null;
    protected $modified = [];

    static protected $_instance = null;
................................................................................
                    $key = str_replace('accueil_', '', $key);
                    throw new UserException('Le nom de la page d\'accueil ' . $key . ' ne peut rester vide.');
                }
                break;
            }
            case 'email_asso':
            {
                if (!filter_var($value, FILTER_VALIDATE_EMAIL))
                {
                    throw new UserException('Adresse e-mail invalide.');
                }
                break;
            }
            case 'champs_membres':
            {




>
>







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
...
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?php

namespace Garradin;

use KD2\SMTP;

class Config
{
    protected $fields_types = null;
    protected $config = null;
    protected $modified = [];

    static protected $_instance = null;
................................................................................
                    $key = str_replace('accueil_', '', $key);
                    throw new UserException('Le nom de la page d\'accueil ' . $key . ' ne peut rester vide.');
                }
                break;
            }
            case 'email_asso':
            {
                if (!SMTP::checkEmailIsValid($value, false))
                {
                    throw new UserException('Adresse e-mail invalide.');
                }
                break;
            }
            case 'champs_membres':
            {

Modified src/include/lib/Garradin/Utils.php from [e50ac2ace1] to [2c57e78421].

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
        {
            $to = [$to];
        }

        foreach ($to as $recipient)
        {
            // Ne pas envoyer de mail à des adresses invalides
            if (!filter_var($recipient, FILTER_VALIDATE_EMAIL))
            {
                continue;
            }

            if (!self::_sendMail($recipient, $subject, $content, $headers))
            {
                throw new \RuntimeException('Impossible d\'envoyer l\'email');







|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
        {
            $to = [$to];
        }

        foreach ($to as $recipient)
        {
            // Ne pas envoyer de mail à des adresses invalides
            if (!SMTP::checkEmailIsValid($recipient, false))
            {
                continue;
            }

            if (!self::_sendMail($recipient, $subject, $content, $headers))
            {
                throw new \RuntimeException('Impossible d\'envoyer l\'email');