URL to delete topics

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

URL to delete topics

Post by oleua »

Hello,

Can someone kindly post the url that given a list of topics id will delete them? Precisely will arrive to the page that asks confirmation for it. I bet it will be something like mcp.php .. action=delete_topic ... topic_id_list ...

Thank you very much.
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: URL to delete topics

Post by Pony99CA »

I clicked four topics on my board to delete and the confirmation page URL looked like this:

Code: Select all

http://www.svpocketpc.com/discuss/mcp.php?&f=12&i=main&forum_action=&mode=forum_view&start=0
I don't think you'll see what you want there. The query string is probably where you return when the confirmation is complete.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

Re: URL to delete topics

Post by oleua »

There definitely is such url :) Anyone? Thanks.
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: URL to delete topics

Post by callumacrae »

No, this is not possible on a vanilla board, and for very good reason - having a link to do this would leave the board open to CSRFs. When you click the delete link, you see a "Are you sure?" form. This does two things - makes sure that you are sure, and sends a code to the browser to send back.
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

Re: URL to delete topics

Post by oleua »

I don't want to avoid the confirmation. I want to delete with 1 url (and 1 confirmation) an arbitrary set of topics.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70280
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: URL to delete topics

Post by KevC »

The moderator control panel for a forum allows you to select and delete multiple topics in one click. You could do that in less time than it takes to write out the URL and work out all the topic ID numbers you want to add to it.

Maybe you should explain the full story of what you're trying to do.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

Re: URL to delete topics

Post by oleua »

Kevin Clark wrote:The moderator control panel for a forum allows you to select and delete multiple topics
It does only if topics are in the same forum - as I said, arbitrary set of topics ;)
Maybe you should explain the full story of what you're trying to do.
I checked it myself (was lazy, I admit) ..

Code: Select all

mcp.php?topic_id_list[]=123&topic_id_list[]=456&action=delete_topic
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: URL to delete topics

Post by callumacrae »

Try finding the confirm_box for this and replace the if statement with if (true). You will be leaving your board open to CSRF, and I wouldn't recommend doing this on a live board.
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

Re: URL to delete topics

Post by oleua »

Callum95 wrote:Try finding the confirm_box for this and replace the if statement with if (true). You will be leaving your board open to CSRF, and I wouldn't recommend doing this on a live board.
Thanks but I really don't need anything but the URL I already posted. I don't want to substitute any regular phpbb functions, I just need to do some maintenance without wasting time!
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: URL to delete topics

Post by callumacrae »

oleua wrote:
Callum95 wrote:Try finding the confirm_box for this and replace the if statement with if (true). You will be leaving your board open to CSRF, and I wouldn't recommend doing this on a live board.
Thanks but I really don't need anything but the URL I already posted. I don't want to substitute any regular phpbb functions, I just need to do some maintenance without wasting time!
The URL you posted worked?
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: URL to delete topics

Post by Danielx64 »

Callum95 wrote:
oleua wrote:
Callum95 wrote:Try finding the confirm_box for this and replace the if statement with if (true). You will be leaving your board open to CSRF, and I wouldn't recommend doing this on a live board.
Thanks but I really don't need anything but the URL I already posted. I don't want to substitute any regular phpbb functions, I just need to do some maintenance without wasting time!
The URL you posted worked?
I bet it won't, I just tested this and I get:

Information

You are not authorised to access this area.

and the user is not logged in.
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: URL to delete topics

Post by Pony99CA »

*Daniel wrote:I bet it won't, I just tested this and I get:

Information

You are not authorised to access this area.

and the user is not logged in.
Did you try it in the browser address bar while viewing a board where you were logged in as a moderator? I presume that you have to be logged in as moderator for this to even have a shot at working.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: URL to delete topics

Post by callumacrae »

I can guarantee you that there is no single URL you can access to delete a topic. If you could, it would count as a vulnerability.
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
oleua
Registered User
Posts: 50
Joined: Sat May 28, 2011 6:50 am

Re: URL to delete topics

Post by oleua »

Guys, I am OBVIOUSLY the admin of the forum... as you read above.. I wrote maintenance.. :lol: :lol:
And the URL I posted works perfectly fine for what I need, i.e. trigger the delete of an arbitrary set of topics .. granted (obviously :lol: ) that I need proper permissions ..
Imagine to have hundreds of topics to delete that are scattered in a dozen of forums which contain ten of thousands of topics.. needless to say I am not looking forward to waste all my day doing the deleting with the MCP. ;) One could argue that I could do it directly on the DB (with 3 queries actually [post, topics, attachments]) but then I would have to resynch all forums (and stats).. again long and boring operation ;)
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: URL to delete topics

Post by Pony99CA »

oleua wrote:Guys, I am OBVIOUSLY the admin of the forum... as you read above.. I wrote maintenance.
It's hardly obvious. Moderators can do maintenance, too. (And you only wrote maintenance after several posts....)
oleua wrote:Imagine to have hundreds of topics to delete that are scattered in a dozen of forums which contain ten of thousands of topics.. needless to say I am not looking forward to waste all my day doing the deleting with the MCP.
I think the point is that you'll still have to gather up those topic IDs, so you still have to visit those dozen forums and check those tens of thousands of topics. If you already have those topics IDs, then maybe the URL makes sense, but you never answered Kevin's question:
Maybe you should explain the full story of what you're trying to do.
I think we're all kind of curious by now exactly what kind of maintenance you're trying to do -- remove spam, clean up old topics, remove all topics from a given user, etc.?

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
Post Reply

Return to “phpBB Discussion”