[QGIS-Developer] [Qgis-psc] Request for Change of UserAgent

Nyall Dawson nyall.dawson at gmail.com
Sun Feb 24 15:25:41 PST 2019


On Mon, 25 Feb 2019 at 09:05, Jonathan Moules
<jonathan-lists at lightpear.com> wrote:
>
> This makes sense, but thinking about it, it doesn't seem plausible.
>
> If I were whitelisting user agents, there are three ways I'd consider
> doing it.
>
> Explicit full string:
> * "Mozilla/5.0 QGIS/3.4.3-Madeira" - except of course that'd break next
> time someone updates QGIS by even a point version. So I doubt anyone is
> doing that; too much maintenance. And if they *are* doing this, well
> then they'll have to update their whitelist with the new user agent on
> the new release whether it includes "Mozilla" or not.
>
> * Some sort of regexp looking for that structure (i.e. "Mozilla/5.0
> QGIS/[0-9].[0-9]...") but allow any set of numbers. I can't conceive of
> when this would be the best option or even a "good" option - it's just
> asking for problems with version numbers (what happens when QGIS gets to
> double-digits in any version field for instance?). I don't doubt it may
> solve a particular problem somewhere maybe, but I would hope there
> wouldn't be many using this method (and of course, this is assuming that
> the "Mozilla" is part of the regex).
>
> * Search the user agent for the string "QGIS". I do some things that
> look at user-agents and this is what I do. It's easily the simplest and
> definitely the most fool-proof way to validate a client is at least
> claiming to be QGIS.

Actually - I'm thinking more of the case where a server doesn't
know/care about QGIS, and is only allowing requests which begin with
"Mozilla/5.0".

Nyall

>
> So I'd suggest this is probably not something to worry about.
> Cheers,
> Jonathan
>
>
> On 2019-02-24 22:44, Nyall Dawson wrote:
> > On Sun, 24 Feb 2019 at 04:38, Jonathan Moules
> > <jonathan-lists at lightpear.com> wrote:
> >> Hi Richard,
> >>
> >> I don't think without more information it's clear precisely what QGIS
> >> should change to help them?
> >>
> >> Indeed, personally I'm still not sure what the current problem is for
> >> them. I get that they have some over-users of their service and need to
> >> curtail this (a very tricky problem), but what's their current solution
> >> and how does a user-agent change help it?
> >>
> >> I'd suggest against QGIS using different user-agents for destinations as
> >> was suggested earlier in the thread because down that road lies madness
> >> (it's a highly opaque thing that /will/ bite people as they try and
> >> debug issues).
> > My main concern is possible regressions if we flip to a
> > "less-standard" user agent. It's highly likely that there's servers
> > out there which block requests based on user agent whitelists, so by
> > changing the user agent across the whole app we'd potentially be
> > blocking access to these servers.
> >
> > Nyall
> >
> >> Cheers,
> >>
> >> Jonathan
> >>
> >>
> >> On 23/02/2019 11:17, Richard Duivenvoorde wrote:
> >>> For what I understand, they use some cookie-based trick to help maintain
> >>> their QOS (and then to make it possible to throttle a very demanding web
> >>> application?).
> >>>
> >>> This made sense to me. Also because I really do not envy maintainers of
> >>> such services: it is hard to keep up such free services (as an example
> >>> (see irc log) he mentioned that certain transportation software started
> >>> to poll the reverse geocoding every second in every car). I think it's
> >>> pretty important for us to have OSM, and be helpfull to them.
> >>> But if Firefishy/Grant is willing to give more details (he is in bcc)
> >>> that would be great.
> >>>
> >>> Regards,
> >>>
> >>> Richard
> >>>
> >>>
> >>> _______________________________________________
> >>> QGIS-Developer mailing list
> >>> QGIS-Developer at lists.osgeo.org
> >>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>
> >> _______________________________________________
> >> QGIS-Developer mailing list
> >> QGIS-Developer at lists.osgeo.org
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>


More information about the QGIS-Developer mailing list