Skip to content

Commit 5f92f23

Browse files
committed
Remove GeoIP rendering via OSM to avoid exposing users to possible unsafe remote JS libraries (reported by Paul Gevers)
1 parent 91739af commit 5f92f23

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ To be released
22

33
* Github #309: Update of Japanese translation
44
(IWAI, Masaharu)
5+
* Removes GeoIP rendering via OSM to avoid exposing
6+
users to remote JS library resources.
7+
(reported by Paul Gevers)
58

69

710
2016-01-30 Lars Windolf <lars.windolf@gmx.de>

xslt/item.xml.in

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -258,36 +258,6 @@
258258

259259
<div id="shading" class="{$shading}">
260260
<div class='content'>
261-
<!-- insertion div for GeoRSS coordinates, adding an OpenStreet map -->
262-
<xsl:if test="attributes/attribute[ @name = 'point' ]">
263-
<p id="mapdiv" style="width:400px;height:200px;float:right; border: 1px solid #000;"></p>
264-
</xsl:if>
265-
266-
<!-- extra item content handling for GeoRSS coordinates, adding an OpenStreet map -->
267-
<xsl:if test="attributes/attribute[ @name = 'point' ]">
268-
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
269-
<script type="text/javascript">
270-
<![CDATA[var lat=]]><xsl:value-of select="substring-before(attributes/attribute[ @name = 'point' ],' ')"/><![CDATA[
271-
var lon=]]><xsl:value-of select="substring-after(attributes/attribute[ @name = 'point' ],' ')"/>
272-
var zoom=9
273-
274-
var map;
275-
function load() {
276-
map = new OpenLayers.Map("mapdiv");
277-
map.addLayer(new OpenLayers.Layer.OSM());
278-
var lonLat = new OpenLayers.LonLat(lon,lat)
279-
.transform(
280-
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
281-
map.getProjectionObject() // to Spherical Mercator Projection
282-
);
283-
var markers = new OpenLayers.Layer.Markers("Markers");
284-
map.addLayer(markers);
285-
markers.addMarker(new OpenLayers.Marker(lonLat));
286-
map.setCenter (lonLat, zoom);
287-
}
288-
</script>
289-
</xsl:if>
290-
291261
<!-- the item's content -->
292262
<p dir="{$txtDirection}">
293263
<!-- optional gravatar -->

0 commit comments

Comments
 (0)