Re: [xwiki-users] Comments spam

2007-09-04 Thread Vincent Massol


On Sep 4, 2007, at 5:33 PM, Antonio Goncalves wrote:


There's nothing for Albatross but.


The captcha is not used in the albatross skin but it's easy enough to  
add. If anyone submits a patch in a jira issue it could be committed  
relatively quickly... ;) (if there are selenium tests then it can be  
committed immediatly ;)).


Thanks
-Vincent



2007/9/3, Paul Armstrong <[EMAIL PROTECTED]>:
On Mon, Sep 03, 2007 at 05:17:30PM +0200, Antonio Goncalves wrote:
> BTW, is there a functionality to add "simple" captcha to add  
comments (like

> "1+3=") ?

find dodo -exec grep -i captcha /dev/null {} \;
dodo/captcha.vm:#if ($captchaPlugin)
dodo/captcha.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/wysiwyg.vm:#if ($captchaPlugin)
dodo/wysiwyg.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/edit.vm:#if ($captchaPlugin)
dodo/edit.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/comments.vm:#if ($captchaPlugin)
dodo/comments.vm: $captchaPlugin.displayCaptcha 
("comment","wiki_captcha")


Paul



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-04 Thread Antonio Goncalves
There's nothing for Albatross but.

2007/9/3, Paul Armstrong <[EMAIL PROTECTED]>:
>
> On Mon, Sep 03, 2007 at 05:17:30PM +0200, Antonio Goncalves wrote:
> > BTW, is there a functionality to add "simple" captcha to add comments
> (like
> > "1+3=") ?
>
> find dodo -exec grep -i captcha /dev/null {} \;
> dodo/captcha.vm:#if ($captchaPlugin)
> dodo/captcha.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
> dodo/wysiwyg.vm:#if ($captchaPlugin)
> dodo/wysiwyg.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
> dodo/edit.vm:#if ($captchaPlugin)
> dodo/edit.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
> dodo/comments.vm:#if ($captchaPlugin)
> dodo/comments.vm: $captchaPlugin.displayCaptcha("comment","wiki_captcha")
>
> Paul
>
> --
> End dual-measurement, let's finish going metric!
> http://gometric.us/
> http://www.metric.org/
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Paul Armstrong
On Mon, Sep 03, 2007 at 05:17:30PM +0200, Antonio Goncalves wrote:
> BTW, is there a functionality to add "simple" captcha to add comments (like
> "1+3=") ?

find dodo -exec grep -i captcha /dev/null {} \;
dodo/captcha.vm:#if ($captchaPlugin)
dodo/captcha.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/wysiwyg.vm:#if ($captchaPlugin)
dodo/wysiwyg.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/edit.vm:#if ($captchaPlugin)
dodo/edit.vm:  $captchaPlugin.displayCaptcha("edit","wiki_captcha")
dodo/comments.vm:#if ($captchaPlugin)
dodo/comments.vm: $captchaPlugin.displayCaptcha("comment","wiki_captcha")

Paul

-- 
End dual-measurement, let's finish going metric!
http://gometric.us/
http://www.metric.org/

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
Yes, this example is just what I need. If anybody knows how it works, I'm in
it.

Antonio


2007/9/3, Guillaume Lerouge <[EMAIL PROTECTED]>:
>
> Such a feature was developed some time ago and I've seen it used on a
> XWiki instance (see 
> http://wikipeople.elle.fr/xwiki/bin/view/People/JenniferAniston?viewer=comments
> ). Do anyone around knows whether it can be re-used easily?
>
> Guillaume
>
> On 03/09/07, Antonio Goncalves < [EMAIL PROTECTED]> wrote:
> >
> > BTW, is there a functionality to add "simple" captcha to add comments
> > (like "1+3=") ?
> >
> > 2007/9/3, Sergiu Dumitriu <[EMAIL PROTECTED]>:
> > >
> > > The best way would be to rollback the document to a previous version,
> > > before the spam. This is not a good idea when actual document changes
> > > and spam comments are mixed, as you will also lose the changes.
> > >
> > > On 9/3/07, Antonio Goncalves < [EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > My XWiki website has been spammed with more than 200 (porn) comments
> > > on the
> > > > main page. I didn't want to put any access restriction on comments
> > > thinking
> > > > that the world was a better place and that anybody could comment
> > > :o)  Well,
> > > > I was wrong and I'm gonna change the user rights.
> > > >
> > > > How can I safely delete all these comments (by hand it will take me
> > > ages) ?
> > > >
> > > > Thanks,
> > > >
> > > > Antonio
> > > > ___
> > > > users mailing list
> > > > users@xwiki.org
> > > > http://lists.xwiki.org/mailman/listinfo/users
> > > >
> > > >
> > >
> > >
> > > --
> > > http://purl.org/net/sergiu
> > > ___
> > > users mailing list
> > > users@xwiki.org
> > > http://lists.xwiki.org/mailman/listinfo/users
> > >
> >
> >
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> >
>
>
> --
> http://wikibc.blogspot.com/
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Guillaume Lerouge
Such a feature was developed some time ago and I've seen it used on a XWiki
instance (see
http://wikipeople.elle.fr/xwiki/bin/view/People/JenniferAniston?viewer=comments).
Do anyone around knows whether it can be re-used easily?

Guillaume

On 03/09/07, Antonio Goncalves <[EMAIL PROTECTED]> wrote:
>
> BTW, is there a functionality to add "simple" captcha to add comments
> (like "1+3=") ?
>
> 2007/9/3, Sergiu Dumitriu <[EMAIL PROTECTED]>:
> >
> > The best way would be to rollback the document to a previous version,
> > before the spam. This is not a good idea when actual document changes
> > and spam comments are mixed, as you will also lose the changes.
> >
> > On 9/3/07, Antonio Goncalves <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > My XWiki website has been spammed with more than 200 (porn) comments
> > on the
> > > main page. I didn't want to put any access restriction on comments
> > thinking
> > > that the world was a better place and that anybody could comment
> > :o)  Well,
> > > I was wrong and I'm gonna change the user rights.
> > >
> > > How can I safely delete all these comments (by hand it will take me
> > ages) ?
> > >
> > > Thanks,
> > >
> > > Antonio
> > > ___
> > > users mailing list
> > > users@xwiki.org
> > > http://lists.xwiki.org/mailman/listinfo/users
> > >
> > >
> >
> >
> > --
> > http://purl.org/net/sergiu
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>


-- 
http://wikibc.blogspot.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
BTW, is there a functionality to add "simple" captcha to add comments (like
"1+3=") ?

2007/9/3, Sergiu Dumitriu <[EMAIL PROTECTED]>:
>
> The best way would be to rollback the document to a previous version,
> before the spam. This is not a good idea when actual document changes
> and spam comments are mixed, as you will also lose the changes.
>
> On 9/3/07, Antonio Goncalves <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > My XWiki website has been spammed with more than 200 (porn) comments on
> the
> > main page. I didn't want to put any access restriction on comments
> thinking
> > that the world was a better place and that anybody could comment
> :o)  Well,
> > I was wrong and I'm gonna change the user rights.
> >
> > How can I safely delete all these comments (by hand it will take me
> ages) ?
> >
> > Thanks,
> >
> > Antonio
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> >
>
>
> --
> http://purl.org/net/sergiu
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Sergiu Dumitriu
The best way would be to rollback the document to a previous version,
before the spam. This is not a good idea when actual document changes
and spam comments are mixed, as you will also lose the changes.

On 9/3/07, Antonio Goncalves <[EMAIL PROTECTED]> wrote:
> Hi,
>
> My XWiki website has been spammed with more than 200 (porn) comments on the
> main page. I didn't want to put any access restriction on comments thinking
> that the world was a better place and that anybody could comment :o)  Well,
> I was wrong and I'm gonna change the user rights.
>
> How can I safely delete all these comments (by hand it will take me ages) ?
>
> Thanks,
>
> Antonio
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>


-- 
http://purl.org/net/sergiu
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
Raffaello I've done the updates but comments still show up. Do I have to
clear a cache or something like that ?


2007/9/3, Raffaello Pelagalli <[EMAIL PROTECTED]>:
>
> "Antonio Goncalves" <[EMAIL PROTECTED]> writes:
>
> > Hi,
> >
> > My XWiki website has been spammed with more than 200 (porn) comments on
> the
> > main page. I didn't want to put any access restriction on comments
> thinking
> > that the world was a better place and that anybody could comment
> :o)  Well, I
> > was wrong and I'm gonna change the user rights.
> >
> > How can I safely delete all these comments (by hand it will take me
> ages) ?
> >
> > Thanks,
>
> Hi,
>
> An easy way to do that, without loosing anything is to change the object
> type of
> each spam comments.
>
> For exemple, you can execute something like that on your database server :
>
> update xwikiobjects, xwikilargestrings set
>   XWO_CLASSNAME='XWiki.XWikiComments_spam' where
>   XWO_CLASSNAME='XWiki.XWikiComments' and XWL_ID=XWO_ID and
>   XWL_VALUE like '%viagra%';
>
> Best regards,
> --
> Raffaello Pelagalli
> XPertNet - XWiki.com
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
BTW, why can't I just delete the comments instead of changing the object
type ? I don't mind loosing these comments, can I damage any database key
constraint ?

2007/9/3, Raffaello Pelagalli <[EMAIL PROTECTED]>:
>
> "Antonio Goncalves" <[EMAIL PROTECTED]> writes:
>
> > Hi,
> >
> > My XWiki website has been spammed with more than 200 (porn) comments on
> the
> > main page. I didn't want to put any access restriction on comments
> thinking
> > that the world was a better place and that anybody could comment
> :o)  Well, I
> > was wrong and I'm gonna change the user rights.
> >
> > How can I safely delete all these comments (by hand it will take me
> ages) ?
> >
> > Thanks,
>
> Hi,
>
> An easy way to do that, without loosing anything is to change the object
> type of
> each spam comments.
>
> For exemple, you can execute something like that on your database server :
>
> update xwikiobjects, xwikilargestrings set
>   XWO_CLASSNAME='XWiki.XWikiComments_spam' where
>   XWO_CLASSNAME='XWiki.XWikiComments' and XWL_ID=XWO_ID and
>   XWL_VALUE like '%viagra%';
>
> Best regards,
> --
> Raffaello Pelagalli
> XPertNet - XWiki.com
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Raffaello Pelagalli
"Antonio Goncalves" <[EMAIL PROTECTED]> writes:

> Thanks Raffaello, I'm gonna try that ASAP.
>  
> I was deleting some comments manually and after a dozen deleted I'v got the
> following exception. Any Idea ? (I'm using XWiki 1.0 on Timcat and MySQL) :
>  
>  A problem occured while trying to service your request. Please contact the
> support if this happens again.
>
> Detailed information:
>
> Error number 3201 in 3: Exception while saving document Main.WebHome
>
> Wrapped Exception: Error number 3211 in 3: Exception while updating archive 
> Main.WebHome
> Wrapped Exception: Error number 3003 in 3: Exception while manipulating the 
> archive for doc Main.WebHome
> Wrapped Exception: 8
> com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving 
> document Main.WebHome
> Wrapped Exception: Error number 3211 in 3: Exception while updating archive 
> Main.WebHome
> Wrapped Exception: Error number 3003 in 3: Exception while manipulating the 
> archive for doc Main.WebHome
> Wrapped Exception: 8
> at 
> com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:314)
> at 
> com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100)
> at 
> com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94)
> [cut]

Hi,

You should check that the XWD_ARCHIVE column of xwikidoc for this document is
not full. If so, you will have to flush it, but you will loose all your
document's history.

Best regards,
-- 
Raffaello Pelagalli
XPertNet - XWiki.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Comments spam

2007-09-03 Thread Antonio Goncalves
Thanks Raffaello, I'm gonna try that ASAP.

I was deleting some comments manually and after a dozen deleted I'v got the
following exception. Any Idea ? (I'm using XWiki 1.0 on Timcat and MySQL) :

 A problem occured while trying to service your request. Please contact the
support if this happens again.

Detailed information:

Error number 3201 in 3: Exception while saving document Main.WebHome
Wrapped Exception: Error number 3211 in 3: Exception while updating
archive Main.WebHome
Wrapped Exception: Error number 3003 in 3: Exception while
manipulating the archive for doc Main.WebHome
Wrapped Exception: 8com.xpn.xwiki.XWikiException: Error number 3201 in
3: Exception while saving document Main.WebHome
Wrapped Exception: Error number 3211 in 3: Exception while updating
archive Main.WebHome
Wrapped Exception: Error number 3003 in 3: Exception while
manipulating the archive for doc Main.WebHome
Wrapped Exception: 8
at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:314)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:914)
at 
com.xpn.xwiki.web.ObjectRemoveAction.action(ObjectRemoveAction.java:49)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:149)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)


Wrapped Exception:
com.xpn.xwiki.XWikiException: Error number 3211 in 3: Exception while
updating archive Main.WebHome
Wrapped Exception: Error number 3003 in 3: Exception while
manipulating the archive for doc Main.WebHome
Wrapped Exception: 8
at 
com.xpn.xwiki.store.XWikiHibernateVersioningStore.updateXWikiDocArchive(XWikiHibernateVersioningStore.java:249)
at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:239)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100)
at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:914)
at 
com.xpn.xwiki.web.ObjectRemoveAction.action(ObjectRemoveAction.java:49)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:149)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati

Re: [xwiki-users] Comments spam

2007-09-03 Thread Raffaello Pelagalli
"Antonio Goncalves" <[EMAIL PROTECTED]> writes:

> Hi,
>  
> My XWiki website has been spammed with more than 200 (porn) comments on the
> main page. I didn't want to put any access restriction on comments thinking
> that the world was a better place and that anybody could comment :o)  Well, I
> was wrong and I'm gonna change the user rights.
>  
> How can I safely delete all these comments (by hand it will take me ages) ?
>  
> Thanks,

Hi,

An easy way to do that, without loosing anything is to change the object type of
each spam comments.

For exemple, you can execute something like that on your database server :

update xwikiobjects, xwikilargestrings set 
   XWO_CLASSNAME='XWiki.XWikiComments_spam' where 
   XWO_CLASSNAME='XWiki.XWikiComments' and XWL_ID=XWO_ID and 
   XWL_VALUE like '%viagra%';

Best regards,
-- 
Raffaello Pelagalli
XPertNet - XWiki.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users