Dotclear

Changeset 3600:f9ab70453f48


Ignore:
Timestamp:
11/13/17 11:35:59 (6 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Fix target="blank" vulnerability, thanks DaScritch? for report

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/_public.php

    r3583 r3600  
    102102 
    103103                    $targetBlank = ((isset($m['targetBlank'])) && ($m['targetBlank']))? true:false; 
    104                      
     104 
    105105                    # Active item test 
    106106                    $active = false; 
     
    112112                    } 
    113113                    $title = $span = ''; 
    114                      
     114 
    115115                    if ($m['descr']) { 
    116116                         if (($description == 'title' || $description == 'both') && $targetBlank) { 
     
    124124                         } 
    125125                    } 
    126                      
     126 
    127127                    if( empty($title) && $targetBlank){ 
    128128                         $title = ' title="'.__("the link will open a new window").'"'; 
    129129                    } 
    130                                
     130 
    131131                    $label = html::escapeHTML(__($m['label'])); 
    132132 
     
    150150                              '">'. 
    151151                              '<a href="'.$href.'"'.$item['title']. 
    152                               (($targetBlank) ? 'target="_blank"': '').'>'. 
     152                              (($targetBlank) ? 'target="_blank" rel="noopener noreferrer"': '').'>'. 
    153153                              '<span class="simple-menu-label">'.$item['label'].'</span>'. 
    154154                              $item['span'].'</a>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map