Projet

Général

Profil

Development #43217

fc.js: ajouter noopener,noreferrer lors du window.open

Ajouté par Thomas Noël il y a presque 4 ans. Mis à jour il y a presque 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
-
Début:
22 mai 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Dans src/authentic2_auth_fc/static/authentic2_auth_fc/js/fc.js il y a

var newWindow = window.open(url, title, 'location=0,status=0,menubar=0,toolbar=0,scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

Il faut semble-t-il plutôt passer par quelque chose comme :

function openPopup(url, name, windowFeatures) {
  //Open the popup and set the opener and referrer policy instruction
  var newWindow = window.open(url, name, 'noopener,noreferrer,' + windowFeatures);
  // Reset the opener link
  newWindow.opener = null;
}

pour éviter les possibles attaques «reverse tabnabbing.»


Fichiers

Révisions associées

Révision 5ce3efbe (diff)
Ajouté par Thomas Noël il y a presque 4 ans

franceconnect: add reverse-tabnabbing protection (#43217)

Historique

#1

Mis à jour par Thomas Noël il y a presque 4 ans

#2

Mis à jour par Thomas Noël il y a presque 4 ans

Je sais pas trop commenter tester si "ça marche"... j'ai fait une branche, avis aux amateurs.

#4

Mis à jour par Benjamin Dauvergne il y a presque 4 ans

En fait le mode popup devrait être retiré, c'est interdit par FC donc jamais activé, mais c'est un plus gros patch...

#5

Mis à jour par Benjamin Dauvergne il y a presque 4 ans

  • Statut changé de Solution proposée à Solution validée
#6

Mis à jour par Thomas Noël il y a presque 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 5ce3efbeee3e21483ddb4385cea960abe781a057
Author: Thomas NOEL <tnoel@entrouvert.com>
Date:   Fri May 22 11:04:23 2020 +0200

    franceconnect: add reverse-tabnabbing protection (#43217)

#7

Mis à jour par Frédéric Péters il y a presque 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF