Here’s the wget output with the code added in.
user@host:~$ wget --spider 'http://myninja.url:port/update?secret=12345678'
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:58:26-- http://myninja.url:port/update?secret=12345678
Resolving myninja.url (myninja.url)... xxx.xxx.xxx.xxx
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
--2018-02-04 01:58:27-- (try: 2) http://myninja.url:port/update?secret=12345678
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
Remote file does not exist -- broken link!!!
Here it is after I remove the code and run it the first time.
user@host:~$ wget --spider 'http://myninja.url:port/update?secret=12345678'
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:59:14-- http://myninja.url:port/update?secret=12345678
Resolving myninja.url (myninja.url)... xxx.xxx.xxx.xxx
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://myninja.url:port/update [following]
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:59:14-- http://myninja.url:port/update
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 400 Bad Request
Remote file does not exist -- broken link!!!
Then when I run it again immediately afterward, it works, resulting in
user@host:~$ wget --spider 'http://myninja.url:port/update?secret=12345678'
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:59:20-- http://myninja.url:port/update?secret=12345678
Resolving myninja.url (myninja.url)... xxx.xxx.xxx.xxx
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://myninja.url [following]
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:59:23-- http://myninja.url/
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://myninja.url/login [following]
Spider mode enabled. Check if remote file exists.
--2018-02-04 01:59:23-- http://myninja.url/login
Connecting to myninja.url (myninja.url)|xxx.xxx.xxx.xxx|:port... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
None of the wget attempts leave errors in laravel-error.log
Going to the URL in a browser with the added code gets “Whoops. Looks like something went wrong.”, but with two separate boxes on the page saying that. laravel-error.log
shows
[2018-02-04 07:09:22] production.ERROR: ***Symfony\Component\Debug\Exception\FatalThrowableError*** [0] : /var/www/ninja/app/Http/Controllers/AppController.php [Line 279] => Parse error: syntax error, unexpected 'secret' (T_STRING), expecting ',' or ')' {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","url":"http://myninja.url:port/update","previous":"http://myninja.url:port","user_agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.121 Safari/537.36 Vivaldi/1.95.1077.41","ip":"xxx.xxx.xxx.xxx","count":1,"is_console":"no","is_api":"no","db_server":"mysql"} []
[2018-02-04 07:09:22] production.ERROR: ***Symfony\Component\Debug\Exception\FatalThrowableError*** [0] : /var/www/ninja/app/Http/Controllers/AppController.php [Line 279] => Parse error: syntax error, unexpected identifier (T_STRING), expecting ',' or ')' {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","url":"http://myninja.url:port/update","previous":"http://myninja.url:port","user_agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.121 Safari/537.36 Vivaldi/1.95.1077.41","ip":"xxx.xxx.xxx.xxx","count":2,"is_console":"no","is_api":"no","db_server":"mysql"} []
Removing the code once again and trying with a browser results in the 400 error mentioned above, before finally going through successfully the second time.