Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-12 Thread Antoine Musso
Le 11/04/12 09:27, Kim Eik a écrit : I have created a patch for the gallery tag and have been given the following review. https://gerrit.wikimedia.org/r/4609 * JavaScript injection: you can inject javascript: URIs which execute code when clicked * plain links (link=Firefox) are taken as

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-12 Thread Roan Kattouw
On Apr 11, 2012 11:01 PM, Antoine Musso hashar+...@free.fr wrote: const EXT_URL_REGEX = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+ )?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(amp;?

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-12 Thread Daniel Friesen
On Wed, 11 Apr 2012 23:33:53 -0700, Roan Kattouw roan.katt...@gmail.com wrote: On Apr 11, 2012 11:01 PM, Antoine Musso hashar+...@free.fr wrote: const EXT_URL_REGEX = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-12 Thread Antoine Musso
Le 12/04/12 08:33, Roan Kattouw a écrit : snip some long regex ZOMG. Anyway, what I'd do if I had a MediaWiki clone handy is look through Sanitizer.php to see if there's anything in there that handles URLs. Parser.php already has some code when dealing with link= parameter for image tags. That

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-12 Thread Kim Eik
My latest patch reuses regex already defined in Parser.php. please review @ https://gerrit.wikimedia.org/r/#change,4609 On Thu, Apr 12, 2012 at 10:43 AM, Antoine Musso hashar+...@free.fr wrote: Le 12/04/12 08:33, Roan Kattouw a écrit : snip some long regex ZOMG. Anyway, what I'd do if I had a

[Wikitech-l] Patch for gallery tag, review questions.

2012-04-11 Thread Kim Eik
I have created a patch for the gallery tag and have been given the following review. https://gerrit.wikimedia.org/r/4609 * JavaScript injection: you can inject javascript: URIs which execute code when clicked * plain links (link=Firefox) are taken as relative URLs which will randomly work or not

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-11 Thread Sumana Harihareswara
On 04/11/2012 03:27 AM, Kim Eik wrote: I have created a patch for the gallery tag and have been given the following review. https://gerrit.wikimedia.org/r/4609 * JavaScript injection: you can inject javascript: URIs which execute code when clicked * plain links (link=Firefox) are taken

Re: [Wikitech-l] Patch for gallery tag, review questions.

2012-04-11 Thread Brion Vibber
On Wed, Apr 11, 2012 at 12:27 AM, Kim Eik k...@heldig.org wrote: I have created a patch for the gallery tag and have been given the following review. https://gerrit.wikimedia.org/r/4609 * JavaScript injection: you can inject javascript: URIs which execute code when clicked * plain links