* [REMOVED] SQL Checks, those won't be done since we need SQL to
login as admin anyway. Are handled in database.inc.php too.
* [CHANGE] Dropped *nix detection since it would not detect Linux PHP_OS
* [IMPROVED] Simply check if we can use socket_create at all, fall back
to fsockopen if this does not exist.
Not addressing any specific issue, just some cleanup.
Without this patch, admin.php checks if it can connect to the wallet service. Regardless of if that check passes or fails, it then checks if the cold wallet address is valid. If the can_connect() test failed, the validateaddress() check will also fail, even if the address is not invalid. To fix this, the validateaddress() check is move to an elseif block in the can_connect() chain.
Additionally, this patch checks to see if the wallet service is running as a testnet. While running as a testnet is perfectly acceptable when testing, the suer should be warned. A lot of folks using the quickstart guide miss this.
A function was added to the Bitcoin class to detect when we are running in a test net. A check was added to admin.php, and the existing can_connect and validateaddress() calls were restructured to solve these issues.
htaccess to block access to the logs
by default, only log warnings
simple config check to see if that folder is writable
warning if changeNoFee is used
warning if setLocked is used
warning if changeAdmin is used
warning if when logging in that IP is different than saved IP
info if a login fails with bad user or password
warning if a user is locked via failed logins
info if an update/etc fails with bad pin
warning if a user is locked via failed pins
info when a pin request is sent
warning when a pin request email doesn't send
warning when trying to request pin reset and incorrect password
info when a twofactor token sent
warning if twofactor email doesn't send
warning when a user tries to request multiple of the same type of token
info when a twofactor token is deleted
warning if a twofactor token fails to delete
warning when an invalid change password token is used
info on successful account update
warning when reset password is called and IP doesn't match saved IP, info otherwise
warning if isAuthenticated falls through and kills a session
switched that in all places used (class loads mostly)
moved all includes at the beginning of index into bootstrap
moves *_PATH defines from config to bootstrap
config now uses defaults first, then user config