Projet

Général

Profil

0001-do-not-allow-unauthenticated-access-to-unlink-page-2.patch

Frédéric Péters, 09 mars 2018 13:31

Télécharger (999 octets)

Voir les différences:

Subject: [PATCH] do not allow unauthenticated access to unlink page (#22405)

 src/authentic2_auth_fc/views.py | 2 ++
 1 file changed, 2 insertions(+)
src/authentic2_auth_fc/views.py
488 488
        return kwargs
489 489

  
490 490
    def dispatch(self, request, *args, **kwargs):
491
        if not request.user.is_authenticated():
492
            raise PermissionDenied()
491 493
        # We prevent unlinking if the user has no usable password and can't change it
492 494
        # because we assume that the password is the unique other mean of authentication
493 495
        # and unlinking would make the account unreachable.
494
-