Skip to content
Snippets Groups Projects
Commit 95f314b8 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added Logs to identify wrong part of authorization

parent b7856bb4
No related branches found
No related tags found
1 merge request!22Resolve "Increase readability of Proxy URLs"
......@@ -105,6 +105,7 @@ class ProxyController extends Controller
public function proxy(Request $request)
{
if(!$request->filled("url") || !$request->filled("password") || !$request->filled("valid-until")){
Log::info("Request with missing url, password or valid-until");
abort(400, "Invalid Request");
}
......@@ -114,6 +115,7 @@ class ProxyController extends Controller
// Check Password
if(!self::checkPassword($targetUrl, $validUntil, $password)){
Log::info("Password incorrect");
abort(400, "Invalid Request");
}
......@@ -124,6 +126,7 @@ class ProxyController extends Controller
}
if ($validUntil->isBefore(Carbon::now()->setTimezone("UTC"))) {
Log::info("URL expired");
abort(400, "Invalid Request");
}
......@@ -133,6 +136,7 @@ class ProxyController extends Controller
// The target URL couldn't be parsed. This is probably a malformed URL
// The URL to load itself is a URL to our proxy
if($host === false || $host === $selfHost){
Log::info("URL to myself");
abort(404, "Invalid Request");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment