List Info

Thread: Allowing user video input




Allowing user video input
user name
2006-08-05 14:10:53
Hi regexp experts

I have been trying to think of an appropirate regexp that
would allow
users to post video code on a site but not allow them to add
any
malicious code.

<object>
<embed>
</embed>
</object>

or

<embed>
</embed>

or

<embed   />

the attributes of the tags must allow no <script or
script
also it must not allow java applets.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Allowing user video input
user name
2006-08-05 15:36:18
gj wrote:
> Hi regexp experts
>
> I have been trying to think of an appropirate regexp
that would allow
> users to post video code on a site but not allow them
to add any
> malicious code.
>
> the attributes of the tags must allow no <script or
script
> also it must not allow java applets.

So you don't want '<script', 'script',
'<applet' ....tags show up in
your input strings? Is this correct? then you may want to
try something
like:

  ^(?!.*<?script)(?!.*<applet)

you can append more (?!.*TEXT) to forbid any other TEXTs you
dislike,
i.e. 

  ^(?!.*<?script)(?!.*<applet)(?!.*TEXT)

untested
Xicheng


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Allowing user video input
user name
2006-08-07 00:29:06
thank you very much, i am going to try this and let you know if it works.

On 8/5/06, Xicheng Jia <gmail.com">xichenggmail.com> wrote:

gj wrote:
>; Hi regexp experts
&gt;
> I have been trying to think of an appropirate regexp that would allow
>; users to post video code on a site but not allow them to add any
> malicious code.
>
> the attributes of the tags must allow no <script or script
>; also it must not allow java applets.

So you don't want '<script', 'script', '<applet' ....tags show up in
your input strings? Is this correct? then you may want to try something
like:

^(?!.*<?script)(?!.*<;applet)

you can append more (?!.*TEXT) to forbid any other TEXTs you dislike,
i.e.

^(?!.*<?script)(?!.*<applet)(?!.*TEXT)

untested
Xicheng




--
http://www.freelance-window.com - outsource today
http://www.silasco.net - best computer hardware deals online
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )