openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.11k stars 907 forks source link

Imagery blacklist blocks Google Cloud Storage hosted imagery #3591

Closed ramSeraph closed 2 weeks ago

ramSeraph commented 2 years ago

The current imagery blacklist meant to block google maps imagery also blocks imagery hosted on Google cloud storage.

Current regex at https://github.com/openstreetmap/openstreetmap-website/blob/master/config/settings.yml#L89

sample google cloud storage url: "https://storage.googleapis.com/bucket_name/obj_name"

pnorman commented 2 years ago

What is an example URL?

ramSeraph commented 2 years ago

Updated in the issue description

ramSeraph commented 2 years ago

a working example here - https://storage.googleapis.com/soi_data/export/tiles/{z}/{x}/{y}.webp

ramSeraph commented 2 years ago

I don't mind submitting a PR to fix this, if there is confirmation that it will be let through.. i.e. if there is no ideological objections to this

hlfan commented 2 years ago

If there's no imagery whitelist and only the blacklist regex to update, then the solution in #3512 should do it.

ramSeraph commented 1 year ago

as #3512 is a closed PR.. i am going to ask here.. what is stopping the closure of this issue.. is it a design decision on whether a white list needs to be introduced because of lack of complex regex support in some browsers or is it just a lack of someone to create a PR?

If it is the later case... I will submit the PR which ever way you decide to go

ramSeraph commented 1 year ago

Or is there is there a third direction where you plan to drop the whole blacklist thing, because it is clearly decorative and can be overcome by setting up a simple redirection server? (which is what I am currently doing anyway)

gravitystorm commented 1 year ago

Or is there is there a third direction where you plan to drop the whole blacklist thing, because it is clearly decorative and can be overcome by setting up a simple redirection server? (which is what I am currently doing anyway)

No, because this blacklist is not to strictly enforce a policy, but to prevent people who don't know about the legality of sources from making mistakes. There's a lot of instances where people don't know they aren't supposed to do something, or who don't care and will do it if it's easy, and a much, much smaller number of cases of people who are determined (and skilled) enough to do things like set up a redirection server.

As for the regexps, I haven't yet had a chance to investigate any of the implications mentioned above, so I can't answer which direction for a solution that I would prefer, yet.

ramSeraph commented 1 year ago

Then your blacklist should be much much longer... anyway... not going to argue any further. Please do see what you can do to move the issue forward. Thanks.

ramSeraph commented 1 year ago

I was told I should tell you the importance of the map you are blocking and why you should prioritise this.. this map happens to be the only open map we ever got from SOI. And the redirect i made was a temporary solution and I don't intend to maintain it anymore because I believe in only maintaining things that are really required. So basically you will be blocking a lot of OSM India work by not prioritising this

grischard commented 1 year ago

Then your blacklist should be much much longer... anyway... not going to argue any further. Please do see what you can do to move the issue forward. Thanks.

@ramSeraph your tone with the volunteers who maintain the website isn't appropriate.

The best solution for OSM India is to host the imagery elsewhere. How large is the data? Maybe the OSMF can host it.

ramSeraph commented 1 year ago

I also happen to be a volunteer who collected the map and been hosting it at my own expense and making it available to OSM India. But, I don't believe that what I said was inappropriate but I do apologize if it hurt the feelings of the people involved.

But blacklisting a whole domain because an appropriate regex couldn't be found and then not correcting the problem after pointing it out a month back that a valid use case was being blocked was not ok either.. I did volunteer to fix the regex. All I needed was a decision. And fixing a regex should be an easier solution than moving data around.

ramSeraph commented 1 year ago

If the regexes are that hard to maintain, maybe it would be a good idea to drop them.

pnorman commented 1 year ago

When writing the original regular expressions, I intentionally avoided negative lookbehinds or any other implementation-specific features, because the regular expressions need to work over an assortment of browsers, Java, and whatever else someone might implement an editor in.

ramSeraph commented 1 year ago

So, if a solution can't be found with a non negative lookbehind, a whitelist would be a better idea? Would that mean a API version change? If a whitelist is introduced without an API version change is there a chance of breaking any clients?

ramSeraph commented 1 year ago

I am mostly concerned with JOSM.. if a whitelist is introduced.. I will go and make the necessary changes in JOSM

gravitystorm commented 1 year ago

As for the regexps, I haven't yet had a chance to investigate any of the implications mentioned above, so I can't answer which direction for a solution that I would prefer, yet.

OK, I've had a look through the related issues and thanks @pnorman for the additional information.

I don't have a preferred solution, since I'm not a regexp expert. So I'll outline the constraints, and then I'm happy to review any PR that meets those constraints. But please, realise that there's never a guarantee that any specific PR will be accepted, so please no complaining if a proposed PR is declined and also please no complaining if it takes a while for any PR to be reviewed.

mmd-osm commented 3 weeks ago

Is this still relevant? I've found an issue where OP referred to some other URL where the data has moved to https://github.com/ramSeraph/opendata/issues/22

mmd-osm commented 2 weeks ago

Closing now due to lack of feedback. Please ping again in case we should reopen this issue.