• User's IP AT-code vs JS user.ip_address

    From KenDB3@VERT/KD3NET to All on Monday, December 14, 2015 11:02:21
    Hello there folks!

    I have been working on modifying nolageek's syncWX weather app. (https://gist.github.com/nolageek/4168edf17fae3f834e30)

    I'm a pretty terrible programmer, but there's nothing like a fun project to get you working on stuff you never thought you would touch. However, I noticed something very odd while working with this app. There is an HTTP request for a JSON response that uses the caller's IP address to get their Geo Location. It works rather well. I load this as a Logon event, and then later it can be run as an External.

    The problem is, that when running it at Logon, the user.ip_address appears to remember the LAST IP of the user. When you run it afterwards as an External, it looks fine. I happen to notice this because I ran it from my house in Pawtucket, RI and then at work... but my work has a VLAN back to a corporate firewall in Chesapeake, VA. So it was pretty obvious that it was remembering the last IP address.

    I created something simple to test this, and created a door that displayed also at Logon that spit out the AT-Code for IP along side the user.ip_address.

    The AT-Code is correct, the user.ip_address is remembering the last session. But, when I run it 5 seconds later as a door, these two methods of displaying the IP match.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Digital Man@VERT to KenDB3 on Wednesday, December 16, 2015 00:16:13
    Re: User's IP AT-code vs JS user.ip_address
    By: KenDB3 to All on Mon Dec 14 2015 11:02 am

    The problem is, that when running it at Logon, the user.ip_address appears to remember the LAST IP of the user. When you run it afterwards as an External, it looks fine.

    I just committed a fix for this issue to CVS. Thanks for the report,

    digital man

    Synchronet "Real Fact" #30:
    The Synchronet IRC server (ircd) was written in JS by Randy Sommerfeld (Cyan). Norco, CA WX: 50.0øF, 26.0% humidity, 1 mph SSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Digital Man on Wednesday, December 16, 2015 10:08:02
    Re: User's IP AT-code vs JS user.ip_address
    By: Digital Man to KenDB3 on Wed Dec 16 2015 12:16 am

    The problem is, that when running it at Logon, the user.ip_address
    appears to remember the LAST IP of the user. When you run it
    afterwards as an External, it looks fine.

    I just committed a fix for this issue to CVS. Thanks for the report,

    Thanks DM! I downloaded the latest dev build and it definitely fixed the issue. Much appreciated!

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us