The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Automatic invocation of __destruct method

Henrikas | Last updated: Jul 09, 2020 07:20AM UTC

I was doing this challenge https://portswigger.net/web-security/deserialization/exploiting/lab-deserialization-arbitrary-object-injection-in-php And as I read the solution (the ";" character at the end was missing in my exploit ;D), last entry says "The __destruct() magic method is automatically invoked and will delete Carlos's file." Why is the __destruct() invoked automatically? Is that a code-specific thing (the way this particular lab interacts with cookies) or just a php thing (removing all the data that came from the request when it's completed)? I was trying to do this lab with "Remove account" feature and I was surprised when it worked on a GET request to the main page.

Hannah, PortSwigger Agent | Last updated: Jul 10, 2020 07:20AM UTC