Open zelitomas opened 3 years ago
What uri produces this? $_GLUED is set by the auth middlewares and consumed onwards thougout glued. So this is some auth related issue. Obviously the problem falls to the uploaderApiSave() function in stor. What was the curl command?
Extracted from browser inspector:
Fetch:
fetch("https://japex01.vaizard.xyz/api/stor/v1/upload", {"credentials":"include","headers":{"authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJqYXBleDAxLnZhaXphcmQueHl6IiwiaWF0IjoxNjEzMTI1NjE2LCJleHAiOjE2MTMxMjc0MTYsImp0aSI6IjYwMjY1N2YwZTg5MzIiLCJzdWIiOiJnbHVlZEB0b21hc3plbGluYS5jeiIsImdfdWlkIjozLCJnX2FpZCI6M30.EKkqDMyNtMo5vEHULd7ysHHJNCFuGmirWpkrevLhPe5xc-jSOJC-jiQpX99S85F8Oj14I94WuUUHwXto0M285A","content-type":"multipart/form-data; boundary=----WebKitFormBoundarylxK0analU1htLC2q","sec-fetch-dest":"empty"},"referrerPolicy":"no-referrer-when-downgrade","body":"------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name=\"file[0]\"\r\n\r\nundefined\r\n------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name=\"upload_type\"\r\n\r\ngeneral\r\n------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name=\"actual_dir\"\r\n\r\nfin_costs/\r\n------WebKitFormBoundarylxK0analU1htLC2q--\r\n","method":"POST","mode":"cors"});
CURL:
curl 'https://japex01.vaizard.xyz/api/stor/v1/upload' -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJqYXBleDAxLnZhaXphcmQueHl6IiwiaWF0IjoxNjEzMTI1NjE2LCJleHAiOjE2MTMxMjc0MTYsImp0aSI6IjYwMjY1N2YwZTg5MzIiLCJzdWIiOiJnbHVlZEB0b21hc3plbGluYS5jeiIsImdfdWlkIjozLCJnX2FpZCI6M30.EKkqDMyNtMo5vEHULd7ysHHJNCFuGmirWpkrevLhPe5xc-jSOJC-jiQpX99S85F8Oj14I94WuUUHwXto0M285A' -H 'Origin: file://' -H 'Sec-Fetch-Dest: empty' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ReactNativeDebugger/0.11.7 Chrome/80.0.3987.165 Electron/8.5.2 Safari/537.36' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarylxK0analU1htLC2q' --data-binary $'------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name="file[0]"\r\n\r\nundefined\r\n------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name="upload_type"\r\n\r\ngeneral\r\n------WebKitFormBoundarylxK0analU1htLC2q\r\nContent-Disposition: form-data; name="actual_dir"\r\n\r\nfin_costs/\r\n------WebKitFormBoundarylxK0analU1htLC2q--\r\n' --compressed
Using your curl example yields
{"api":"stor\/upload","version":1,"response_ts":1613240298,"response_id":"602817ea76c55","status":"Internal server error","code":500,"data":[],"message":"Expected file(s), got none."}
no files were sent even if files were expected. I can't replicate a stack trace with the undefiend index. What exactly were you doing to achieve the undefined index?
Stack trace: