Add a noopener and noreferrer to external urls

- noreferrer is used to prevent the browser from sending the referrer
  to the visited site
- noopener fixes a fun class of bug: https://mathiasbynens.github.io/rel-noopener/
master
jvoisin 6 years ago
parent eea9416fbe
commit 90cb02105e
  1. 10
      airsonic-main/src/main/webapp/WEB-INF/jsp/albumMain.jsp
  2. 2
      airsonic-main/src/main/webapp/WEB-INF/jsp/changeCoverArt.jsp
  3. 8
      airsonic-main/src/main/webapp/WEB-INF/jsp/createShare.jsp
  4. 2
      airsonic-main/src/main/webapp/WEB-INF/jsp/error.jsp
  5. 2
      airsonic-main/src/main/webapp/WEB-INF/jsp/externalPlayer.jsp
  6. 4
      airsonic-main/src/main/webapp/WEB-INF/jsp/help.jsp
  7. 2
      airsonic-main/src/main/webapp/WEB-INF/jsp/more.jsp
  8. 2
      airsonic-main/src/main/webapp/WEB-INF/jsp/transcodingSettings.jsp

@ -259,13 +259,13 @@
<sub:param name="type" value="album"/> <sub:param name="type" value="album"/>
</sub:url> </sub:url>
<span class="header"><fmt:message key="top.search"/> <a target="_blank" href="${googleUrl}">Google</a></span> | <span class="header"><fmt:message key="top.search"/> <a target="_blank" href="${googleUrl}">Google</a></span> |
<span class="header"><a target="_blank" href="${wikipediaUrl}">Wikipedia</a></span> | <span class="header"><a target="_blank" rel="noopener noreferrer" href="${wikipediaUrl}">Wikipedia</a></span> |
<span class="header"><a target="_blank" href="${allmusicUrl}">allmusic</a></span> | <span class="header"><a target="_blank" rel="noopener noreferrer" href="${allmusicUrl}">allmusic</a></span> |
<span class="header"><a target="_blank" href="${lastFmUrl}">Last.fm</a></span> | <span class="header"><a target="_blank" rel="noopener noreferrer" href="${lastFmUrl}">Last.fm</a></span> |
<c:if test="${not empty model.musicBrainzReleaseId}"> <c:if test="${not empty model.musicBrainzReleaseId}">
<sub:url value="https://musicbrainz.org/release/${model.musicBrainzReleaseId}" var="musicBrainzUrl" encoding="UTF-8"> <sub:url value="https://musicbrainz.org/release/${model.musicBrainzReleaseId}" var="musicBrainzUrl" encoding="UTF-8">
</sub:url> </sub:url>
<span class="header"><a target="_blank" href="${musicBrainzUrl}">MusicBrainz</a></span> | <span class="header"><a target="_blank" rel="noopener noreferrer" href="${musicBrainzUrl}">MusicBrainz</a></span> |
</c:if> </c:if>
<span class="header"> <span class="header">
<fmt:message key="main.playcount"><fmt:param value="${model.dir.playCount}"/></fmt:message> <fmt:message key="main.playcount"><fmt:param value="${model.dir.playCount}"/></fmt:message>
@ -406,7 +406,7 @@
Upgrade to Subsonic Premium and get: Upgrade to Subsonic Premium and get:
</p> </p>
<div style="font-size: 90%;padding-bottom: 1em"> <div style="font-size: 90%;padding-bottom: 1em">
<p><a href="https://airsonic.github.io/docs/apps/" target="_blank">Apps</a> for Android, iPhone, Windows Phone ++.</p> <p><a href="https://airsonic.github.io/docs/apps/" target="_blank" rel="noopener noreferrer">Apps</a> for Android, iPhone, Windows Phone ++.</p>
<p>Video streaming.</p> <p>Video streaming.</p>
<p>Chromecast and Sonos support.</p> <p>Chromecast and Sonos support.</p>
<p>DLNA/UPnP support</p> <p>DLNA/UPnP support</p>

@ -123,7 +123,7 @@
<div style="clear:both;"></div> <div style="clear:both;"></div>
<div id="images"></div> <div id="images"></div>
<div style="clear:both;"></div> <div style="clear:both;"></div>
<a href="https://last.fm/" target="_blank"><img src="<c:url value="/icons/lastfm.gif"/>"></a> <a href="https://last.fm/" target="_blank" rel="noopener noreferrer"><img src="<c:url value="/icons/lastfm.gif"/>"></a>
<span class="detail" style="padding-left:1em"><fmt:message key="changecoverart.courtesy"/></span> <span class="detail" style="padding-left:1em"><fmt:message key="changecoverart.courtesy"/></span>
</div> </div>

@ -13,13 +13,13 @@
<fmt:message key="share.warning"/> <fmt:message key="share.warning"/>
<p> <p>
<a href="https://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><img src="<spring:theme code="shareFacebookImage"/>" alt=""></a>&nbsp; <a href="https://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank" rel="noopener noreferrer"><img src="<spring:theme code="shareFacebookImage"/>" alt=""></a>&nbsp;
<a href="https://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><fmt:message key="share.facebook"/></a> <a href="https://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank" rel="noopener noreferrer"><fmt:message key="share.facebook"/></a>
</p> </p>
<p> <p>
<a href="https://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><img src="<spring:theme code="shareTwitterImage"/>" alt=""></a>&nbsp; <a href="https://twitter.com/?status=Listening to ${model.playUrl}" target="_blank" rel="noopener noreferrer"><img src="<spring:theme code="shareTwitterImage"/>" alt=""></a>&nbsp;
<a href="https://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><fmt:message key="share.twitter"/></a> <a href="https://twitter.com/?status=Listening to ${model.playUrl}" target="_blank" rel="noopener noreferrer"><fmt:message key="share.twitter"/></a>
</p> </p>
<p> <p>
<fmt:message key="share.link"> <fmt:message key="share.link">

@ -18,7 +18,7 @@
<p> <p>
Airsonic encountered an internal error. You can report this error in the Airsonic encountered an internal error. You can report this error in the
<a href="https://www.reddit.com/r/airsonic" target="_blank">Airsonic Forum</a>. <a href="https://www.reddit.com/r/airsonic" target="_blank" rel="noopener noreferrer">Airsonic Forum</a>.
Please include the information below. Please include the information below.
</p> </p>

@ -45,7 +45,7 @@
</c:forEach> </c:forEach>
</audio> </audio>
<div class="detail" style="text-align:center;">Streaming by <a href="https://airsonic.github.io/" target="_blank"><b>Airsonic</b></a></div> <div class="detail" style="text-align:center;">Streaming by <a href="https://airsonic.github.io/" target="_blank" rel="noopener noreferrer"><b>Airsonic</b></a></div>
<script type="text/javascript"> <script type="text/javascript">
new MediaElementPlayer('player', { new MediaElementPlayer('player', {

@ -41,8 +41,8 @@
<tr><td class="ruleTableHeader"><fmt:message key="help.license.title"/></td><td class="ruleTableCell"> <tr><td class="ruleTableHeader"><fmt:message key="help.license.title"/></td><td class="ruleTableCell">
<a href="http://www.gnu.org/copyleft/gpl.html" target="_blank"><img style="float:right;margin-left: 10px" alt="GPL 3.0" src="<c:url value="/icons/default_light/gpl.png"/>"></a> <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank"><img style="float:right;margin-left: 10px" alt="GPL 3.0" src="<c:url value="/icons/default_light/gpl.png"/>"></a>
<fmt:message key="help.license.text"><fmt:param value="${model.brand}"/></fmt:message></td></tr> <fmt:message key="help.license.text"><fmt:param value="${model.brand}"/></fmt:message></td></tr>
<tr><td class="ruleTableHeader"><fmt:message key="help.homepage.title"/></td><td class="ruleTableCell"><a target="_blank" href="https://airsonic.github.io/">Airsonic website</a></td></tr> <tr><td class="ruleTableHeader"><fmt:message key="help.homepage.title"/></td><td class="ruleTableCell"><a target="_blank" href="https://airsonic.github.io/" rel="noopener nofererrer">Airsonic website</a></td></tr>
<tr><td class="ruleTableHeader"><fmt:message key="help.forum.title"/></td><td class="ruleTableCell"><a target="_blank" href="https://www.reddit.com/r/airsonic">Airsonic on Reddit</a></td></tr> <tr><td class="ruleTableHeader"><fmt:message key="help.forum.title"/></td><td class="ruleTableCell"><a target="_blank" href="https://www.reddit.com/r/airsonic" rel="noopener noreferrer">Airsonic on Reddit</a></td></tr>
<tr><td class="ruleTableHeader"><fmt:message key="help.contact.title"/></td><td class="ruleTableCell"><fmt:message key="help.contact.text"><fmt:param value="${model.brand}"/></fmt:message></td></tr> <tr><td class="ruleTableHeader"><fmt:message key="help.contact.title"/></td><td class="ruleTableCell"><fmt:message key="help.contact.text"><fmt:param value="${model.brand}"/></fmt:message></td></tr>
</table> </table>

@ -263,7 +263,7 @@
</form> </form>
</c:if> </c:if>
<a href="https://airsonic.github.io/docs/apps/" target="_blank"><img alt="Apps" src="<c:url value="/icons/default_light/apps.png"/>" style="float: right;margin-left: 3em; margin-right: 3em"/></a> <a href="https://airsonic.github.io/docs/apps/" target="_blank" rel="noopener noreferrer"><img alt="Apps" src="<c:url value="/icons/default_light/apps.png"/>" style="float: right;margin-left: 3em; margin-right: 3em"/></a>
<h2> <h2>
<img src="<spring:theme code="androidImage"/>" alt=""/> <img src="<spring:theme code="androidImage"/>" alt=""/>

@ -88,7 +88,7 @@
<p style="padding-top:0.75em"> <p style="padding-top:0.75em">
<input type="submit" value="<fmt:message key="common.save"/>" style="margin-right:0.3em"> <input type="submit" value="<fmt:message key="common.save"/>" style="margin-right:0.3em">
<a href='nowPlaying.view'><input type="button" value="<fmt:message key="common.cancel"/>" style="margin-right:1.3em"></a> <a href='nowPlaying.view'><input type="button" value="<fmt:message key="common.cancel"/>" style="margin-right:1.3em"></a>
<a href="https://airsonic.github.io/docs/transcode/" target="_blank"><fmt:message key="transcodingsettings.recommended"/></a> <a href="https://airsonic.github.io/docs/transcode/" target="_blank" rel="noopener noreferrer"><fmt:message key="transcodingsettings.recommended"/></a>
</p> </p>
</form> </form>

Loading…
Cancel
Save