Comments (10)
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.
Or maybe I misunderstood, you talked about button .
Sounds like a bug, I'll look at this.
from malware-repo.
This should better explain; The buttons are making calls to the same API are they not? Thanks.
from malware-repo.
Yeah, that's right there's a bug here. I'll check what's wrong.
from malware-repo.
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.
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.
True, I'm looking.
from malware-repo.
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.
Confirmed fix, thanks.
from malware-repo.
No problem, that will be added in next release.
Thanks for your bug report.
from malware-repo.
Related Issues (9)
- request upload 1TB of malware? HOT 2
- Can't change max malware list in index HOT 1
- malware not shown in interface HOT 1
- REST API HOT 7
- Avatar for account doesnt seem to stick HOT 10
- make virustotal to use proxy
- Samples not displaying when VT or cuckoo get enabled HOT 24
- Bug report - PHP Warning: md5_file(): Filename cannot be empty in /home/website/public_html/src/functions.php line 423 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from malware-repo.