Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
api trouble
#1
Trying to gather information with the following and it does not seem to be functioning.

http://127.0.0.1/sn?pw=opendoor

This does not work.  It just brings up the login screen.

Once logged in 

http://127.0.0.1/sn

does display the expected result

syslog before logging in.

Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39760 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /sn" - 303 See Other
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39760 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /login" - 200 OK
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39760 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/bootstrap-3.3.7/css/bootstrap.min.css" - 304 Not Modifi$
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39762 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/bootstrap-timepicker/css/bootstrap-timepicker.min.css" $
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39764 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/themes/basic/base.css" - 304 Not Modified
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39764 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/scripts/jquery-3.4.1.min.js" - 304 Not Modified
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39760 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/bootstrap-3.3.7/js/bootstrap.min.js" - 304 Not Modified
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39766 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/scripts/behaviors.js" - 304 Not Modified
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39768 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/scripts/schedule.js" - 304 Not Modified
Apr  7 19:56:35 piutility sip[5099]: 127.0.0.1:39762 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/bootstrap-timepicker/js/bootstrap-timepicker.js" - 304 $
Apr  7 19:56:41 piutility sip[5099]: 127.0.0.1:39764 - - [07/Apr/2020 19:56:35] "HTTP/1.1 GET /static/scripts/intervalSelect.js" - 304 Not Modified
Apr  7 19:56:41 piutility sip[5099]: 127.0.0.1:39764 - - [07/Apr/2020 19:56:36] "HTTP/1.1 GET /static/themes/basic/logo.png" - 304 Not Modified
Apr  7 19:56:41 piutility sip[5099]: 127.0.0.1:39762 - - [07/Apr/2020 19:56:36] "HTTP/1.1 GET /static/themes/basic/grass.jpg" - 304 Not Modified
Apr  7 19:56:41 piutility sip[5099]: 127.0.0.1:39772 - - [07/Apr/2020 19:56:36] "HTTP/1.1 GET /static/images/manifest.json" - 304 Not Modified

Syslog after logging in
---
Apr  7 19:58:29 piutility sip[5099]: someone logged in
Apr  7 19:58:29 piutility sip[5099]: 127.0.0.1:39774 - - [07/Apr/2020 19:58:29] "HTTP/1.1 POST /login" - 303 See Other
Apr  7 19:58:29 piutility sip[5099]: 127.0.0.1:39774 - - [07/Apr/2020 19:58:29] "HTTP/1.1 GET /" - 200 OK
Apr  7 19:58:29 piutility sip[5099]: 127.0.0.1:39774 - - [07/Apr/2020 19:58:29] "HTTP/1.1 GET /static/themes/basic/home.png" - 304 Not Modified
Apr  7 19:58:29 piutility sip[5099]: 127.0.0.1:39778 - - [07/Apr/2020 19:58:29] "HTTP/1.1 GET /static/themes/basic/on.png" - 304 Not Modified
Apr  7 19:58:29 piutility sip[5099]: 127.0.0.1:39778 - - [07/Apr/2020 19:58:29] "HTTP/1.1 GET /api/status" - 200 OK
Apr  7 19:58:31 piutility sip[5099]: 192.168.1.202:54072 - - [07/Apr/2020 19:58:31] "HTTP/1.1 GET /api/log" - 200 OK
Apr  7 19:58:52 piutility sip[5099]: 127.0.0.1:39780 - - [07/Apr/2020 19:58:52] "HTTP/1.1 GET /sn" - 200 OK
Apr  7 19:58:52 piutility sip[5099]: 127.0.0.1:39780 - - [07/Apr/2020 19:58:52] "HTTP/1.1 GET /favicon.ico" - 303 See Other
Apr  7 19:58:52 piutility sip[5099]: 127.0.0.1:39780 - - [07/Apr/2020 19:58:52] "HTTP/1.1 GET /" - 200 OK
Reply
#2
What version of SIP are you running?

I tried it here with V 4.0.20 and it worked as expected.

You might try disabling the password under Options > Manage Passphrase. The password does not provide much security.

Dan
<p><br></p>
Reply
#3
(2020 Apr 08, 02:47 PM)dan Wrote: What version of SIP are you running?

I tried it here with V 4.0.20 and it worked as expected.

You might try disabling the password under Options > Manage Passphrase. The password does not provide much security.

Dan

I'm running 4.0.23.  I mainly keep the password to keep the kids from futzing with it. Worked just fine when I was on v3
Reply
#4
(2020 Apr 09, 01:49 AM)danny_aka_rudy Wrote:
(2020 Apr 08, 02:47 PM)dan Wrote: What version of SIP are you running?

I tried it here with V 4.0.20 and it worked as expected.

You might try disabling the password under Options > Manage Passphrase. The password does not provide much security.

Dan

I'm running 4.0.23.  I mainly keep the password to keep the kids from futzing with it.  Worked just fine when I was on v3

OK. I pushed an update to GitHub that fixes the problem.

There was a change in the password checking code in the file "helpers.py" line ~595.
It required the use of "password" instead of "pw" in the query string like so:

http://127.0.0.1/sn?password=opendoor

Don't remember why the change was made, it may have been a result of a search and replace.
The old functionality has been restored to avoid any further problems. Use:

http://127.0.0.1/sn?pw=opendoor

Dan
<p><br></p>
Reply
#5
(2020 Apr 09, 07:01 PM)dan Wrote:
(2020 Apr 09, 01:49 AM)danny_aka_rudy Wrote:
(2020 Apr 08, 02:47 PM)dan Wrote: What version of SIP are you running?

I tried it here with V 4.0.20 and it worked as expected.

You might try disabling the password under Options > Manage Passphrase. The password does not provide much security.

Dan

I'm running 4.0.23.  I mainly keep the password to keep the kids from futzing with it.  Worked just fine when I was on v3

OK. I pushed an update to GitHub that fixes the problem.

There was a change in the password checking code in the file "helpers.py" line ~595.
It required the use of "password" instead of "pw" in the query string like so:

http://127.0.0.1/sn?password=opendoor

Don't remember why the change was made, it may have been a result of a search and replace.
The old functionality has been restored to avoid any further problems. Use:

http://127.0.0.1/sn?pw=opendoor

Dan

Dan,

Go figure it would be in the one file I didn't search through..  Undecided

I had a separate python script that I wrote a while back.  I've got a frankenstein type system I cobbled together with push buttons to manually start stations another to run  script, another to stop all stations.  

It appears as though the service is reporting back properly now.  Thanks for the help!

Dan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)