Re: newuser.js logic issue
By: Nightfox to Digital Man on Sat Oct 20 2012 10:41 am
Hi DM -
While testing my new user script, I think I may have found a logic issue that exists in the stock newuser.js. In the function chk_qwk_id(), the
last check is as follows:
if(system.matchuser(str,true)!=user.number || system.trashcan(str))
I think the purpose of the "system.matchuser(str,true)!=user.number" is to make sure that the username entered belongs to the current user. However, if the newuser.js script needs to ask for a valid QWK ID (i.e., because the username/alias entered by the user is not a valid QWK ID), then system.matchuser() will probably return 0 because it's not found. Since 0 is different from user.number, anything that the user enters for a QWK ID upon new user registration will be rejected.
Thanks, should be fixed now.
digital man
Synchronet "Real Fact" #32:
The Synchronet web user interface was contributed by Robert Couture, Runemaster.
Norco, CA WX: 68.6øF, 77.0% humidity, 4 mph SE wind, 0.01 inches rain/24hrs
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net