Giter Site home page Giter Site logo

Comments (10)

Tigzy avatar Tigzy commented on September 2, 2024

Hello,
Because the DELETE is supposed to have an action as well, like you said "action=deletefile"
This is indeed badly documented, and will be added.
To know the action needed look into api.php for method names.

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

Or maybe I misunderstood, you talked about button .
Sounds like a bug, I'll look at this.

from malware-repo.

vimgodfrey avatar vimgodfrey commented on September 2, 2024

This should better explain; The buttons are making calls to the same API are they not? Thanks.
delbug

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

Yeah, that's right there's a bug here. I'll check what's wrong.

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

Ok, problem is here:
https://github.com/Tigzy/malware-repo/blob/master/api.php#L15

Should be replaced by:

// Extract requested API
$func = isset($_REQUEST['action']) ? strtolower(trim(str_replace("/","",$_REQUEST['action']))) : null;  
if (!$func && isset($_POST['action'])) $func = strtolower(trim(str_replace("/","",$_POST['action']))) ; 

// Could not extract function, and is not a DELETE request
if (!$func && $this->get_request_method() != "DELETE")  $this->response('',406);

from malware-repo.

vimgodfrey avatar vimgodfrey commented on September 2, 2024

Can confirm that fixed the Delete Button- Thanks!

Still having issues with the MD5 download link.
Current link is missing &action=getfiles and returns 406
Including &action=getfiles in POST returns file (200)

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

True, I'm looking.

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

The bug is linked to the previous, those are special url not using the API model and thus that need to be removed from the action check. Please replace the same code with this updated one:

// Extract requested API
$func = isset($_REQUEST['action']) ? strtolower(trim(str_replace("/","",$_REQUEST['action']))) : null;  
if (!$func && isset($_POST['action'])) $func = strtolower(trim(str_replace("/","",$_POST['action']))) ; 

// Could not extract function, and is not a DELETE request nor a DOWNLOAD request
if (!$func && $this->get_request_method() != "DELETE" && !(isset($_REQUEST) && isset($_REQUEST['download']))) {
    $this->response('',406);
}

from malware-repo.

vimgodfrey avatar vimgodfrey commented on September 2, 2024

Confirmed fix, thanks.

from malware-repo.

Tigzy avatar Tigzy commented on September 2, 2024

No problem, that will be added in next release.
Thanks for your bug report.

from malware-repo.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.