Dear Jan and Alexander,

In data venerdì, 6 aprile 2012 01.55:20, Jan Åge Lavik ha scritto:
> On 04/05/2012 02:28 PM, Alexander Wagner wrote:
> >> This is currently considered as a comma-separated list of
> >> authorized user agent strings while I would like to change it
> >> into a regular expression that will be used to match incoming
> >> user-agent strings.
> 
> Does this mean comma separated list of strings representing regular
> expressions or just one expression to cover all cases? The former
> would be less intrusive to existing values. And if the latter, then
> when reading the variable one could treat it as one item list or
> something, using the assumptions of the former. If I understood correctly.

Thanks a lot for the comments. Indeed, having a comma separated list is not 
enough, in order to white-list e.g. User-Agent strings that have versioning 
(say you want to accept all Firefox browsers, you will need regular 
expressions in order to anticipate future versions).

Moreover with regexp, you can simply "|" multiple regexps in order to 
reimplement the comma-separated list feature.

So, considering the previous comment of Alexander, in the end, I am going for 
introducing a new variable: CFG_BATCHUPLOADER_WEB_ROBOT_AGENTS (with the added 
'S') and with the regexp syntax. If some client have customized the old 
CFG_BATCHUPLOADER_WEB_ROBOT_AGENT, when inveniocfg --update-config-py|--
update-all is run, a WARNING will be printed on screen explaining the change 
to be performed.

Again thanks for the suggestions.

Cheers!
        Sam

-- 
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>

Reply via email to