Skip to content

Content Security Policy (CSP) #1122

@likehopper

Description

@likehopper

The security requirements of web servers are increasing. From now it's recommended to have a "Content-Security-Policy" rule. And generally, it prohibits the execution of inline scripts (unsafe-inline).

However, in Sympa's pages, we have an innline script generated dynamically. And that prevents the menu from working.

For example these include:

        <!-- head_javascript.tt2 -->

	<script>
	<!--
	var sympa = {
	    backText:           'Retour',
	    calendarButtonText: 'Calendrier',
	    calendarFirstDay:   0,
	    closeText:          'Fermer',
	    dayNames:           'Lundi:Mardi:Mercredi:Jeudi:Vendredi:Samedi:Dimanche'.split(":"),
	    dayNamesMin:        'D:L:M:M:J:V:S'.split(":"),
	    home_url:           '/sympa/',
	    icon	s_url:          '/static-sympa/icons',
	    lang:               'fr',
	    loadingText:        'Veuillez patienter...',
	    monthNamesShort:    'Jan:Fév:Mar:Avr:Mai:Jui:Juil:Aoû:Sep:Oct:Nov:Déc'.split(":"),
	    openInNewWinText:   'Ouvrir dans une nouvelle fenêtre',
	    resetText:          'Effacer'
	};
	var lang = 'fr';
	//-->
	</script>

Could you change it to call it from an external file?

Thanks,
Vincent

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions