Quellcode durchsuchen

Merge pull request #1473 from sharelatex/as-fix-notification-translation

Inject data into translation string to workaround removed potential XSS

GitOrigin-RevId: 6d9fa7050dafa1d48e3622765586eb4350dc514b
Chrystal Maria Griffiths vor 7 Jahren
Ursprung
Commit
91594eee6d
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      services/web/app/views/project/list/notifications.pug

+ 2 - 2
services/web/app/views/project/list/notifications.pug

@@ -12,7 +12,7 @@ span(ng-controller="NotificationsController").userNotifications
 						.alert.alert-info(ng-switch-when="notification_project_invite", ng-controller="ProjectInviteNotificationController")
 							div.notification_inner
 								.notification_body(ng-show="!notification.accepted")
-									| !{translate("notification_project_invite_message")}
+									| !{translate("notification_project_invite_message", { userName: "{{ userName }}" })}
 									a.pull-right.btn.btn-sm.btn-info(href, ng-click="accept()", ng-disabled="notification.inflight")
 										span(ng-show="!notification.inflight") #{translate("join_project")}
 										span(ng-show="notification.inflight")
@@ -20,7 +20,7 @@ span(ng-controller="NotificationsController").userNotifications
 											|  
 											| #{translate("joining")}...
 								.notification_body(ng-show="notification.accepted")
-									| !{translate("notification_project_invite_accepted_message")}
+									| !{translate("notification_project_invite_accepted_message", { projectName: "{{ projectName }}" })}
 									a.pull-right.btn.btn-sm.btn-info(href="/project/{{ notification.messageOpts.projectId }}") #{translate("open_project")}
 								span().notification_close
 									button(ng-click="dismiss(notification)").close.pull-right