Do some checks on the zoomlevel value provided by users via settings form.

For now only on leaflet player submodule.

Comments

indigoxela’s picture

Issue summary: View changes
StatusFileSize
new1.05 KB
nagy.balint’s picture

Thanks,

Can you do the same for the built in representation?

indigoxela’s picture

Title: Sanitize user input in scald map leaflet player » Sanitize user input in scald map players

Sure, combined patch for both players is coming...

indigoxela’s picture

nagy.balint’s picture

Okey.

Instead of using close to the same code at several place, you could have a validate function in the base module, that you can call each time.

So it always happens the same way.

indigoxela’s picture

Instead of using close to the same code at several place, you could have a validate function in the base module

Sure, that would be more elegant.
Feel free to implement it that way.

Note: the players are a bit different.
In scald_mapleaflet the second argument for the render callback is optional.

nagy.balint’s picture

Okey but in git i can only give author to one person.

So if i rework the code then it will be 2 person, and usually in that case the maintainer gets the commit credit.

indigoxela’s picture

Hi nagy.balint,

So if i rework the code then it will be 2 person, and usually in that case the maintainer gets the commit credit.

That's OK for me, I don't see any problem.

If you do have concerns, let't talk about it ;)

nagy.balint’s picture

Status: Active » Needs review
StatusFileSize
new4.18 KB

Okey here is the patch.

indigoxela’s picture

Hi nagy.balint,
nice catch!

Some more things:

Mapnik has no zoomlevel of 21 (Googlemaps biggest possible value), the biggest value for Mapnik would be 18.
So I guess, it would be better to set max to 18.

Template help text in scald_mapleaflet/scald-mapleaflet-render.tpl.php should reflect the new default value of 8.

Something new, not worth creating an extra issue:
Markup for iframe content in _scald_mapleaflet_content_callback needs the charset set in a meta tag.

New patch is attached.

  • nagy.balint committed b3e168c on 7.x-1.x authored by indigoxela
    Issue #2450347 by indigoxela, nagy.balint: Sanitize user input in scald...
nagy.balint’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.