Commit Graph

137 Commits

Author SHA1 Message Date
xisi
e7bace5550 basic logging, adds logs folder to root dir
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
2014-01-31 13:11:38 -05:00
xisi
afdf3abb29 ripped out all the memcache session stuff, not worth it with the side effects of caching things
cleaned up config/checks
2014-01-30 18:41:56 -05:00
xisi
51818421d8 weird problem, strict for isAuthenticated 2014-01-29 14:46:21 -05:00
xisi
5d017f60c3 how this worked before is beyond me 2014-01-29 13:28:38 -05:00
xisi
568445845a changes DEBUG SALT and SALTY from defines to variables
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
2014-01-29 07:34:50 -05:00
xisi
56ad9266d3 last login time not this login time 2014-01-29 03:55:51 -05:00
xisi
74dec2796d Added last login time/ip address popup on login w/ close button
Info/blue if your ip matches, warning/yellow if not
2014-01-28 15:45:24 -05:00
xisi
9f6cf99aa3 small fixes 2014-01-28 08:08:53 -05:00
xisi
6398e5dfec merged session manager/memcache limiter
cleanup for PR
2014-01-28 07:26:33 -05:00
Joey
63c3b96a29 now enforce client & server validity on login with strict on
fixed csrf token check for a few pages where it mightve been broken
session manager now can be bound to base user class and used, like in login
logout now pushes you to login regardless, no longer has param to push to custom url
fixed validate client, hijacking sessions no longer works
2014-01-28 07:26:32 -05:00
xisi
b728b680ca blah blah 2014-01-28 07:26:08 -05:00
Sebastian Grewe
b783237c2e Merge pull request #1457 from MPOS/issue-1332
Issue 1332
2014-01-28 00:18:56 -08:00
Sebastian Grewe
b87691371f [SECURITY] Path disclosure and redirects
* [SECURITY] Do not disclose paths with wrong query arguments in API
* [SECURITY] Removed $to redirect after login

Fixes #1596 once merged.
2014-01-26 17:41:27 +01:00
Sebastian Grewe
702ed49704 [ADDED] Account lock status
* Lock 1: user confirmation/unlock pending, count shares
* Lock 2: Admin disabled, ignore shares

This further addresses #1332 and should allow proper dropping of shares
for banned accounts.
2014-01-26 11:17:33 +01:00
Sebastian Grewe
816fb783ce Merge pull request #1589 from joebauers/next
Update user.class.php
2014-01-25 23:50:25 -08:00
joebauers
48ce68e612 Update user.class.php
No need to show world if valid account.
2014-01-26 02:44:30 -05:00
Sebastian Grewe
a1a3d7e873 [IMPROVED] Added donation minimum and rounding
* [ADDED] Config option `$config['donate_threshold']['min'] = 1;`
* [VERSION] Incremented config file version to `0.0.6`
* [CHANGED] Round donations to at least two digits
* [CHANGED] Honor minimum set pool donation percentage
* [UPDATED] Account edit template

Fixes #1475 once merged
2014-01-24 10:06:13 +01:00
Sebastian Grewe
ac1bc4b2ce [FIX] Allow admin logins in maintenance mode
Fixes #1489
2014-01-23 08:58:25 +01:00
Sebastian Grewe
faf648d1d2 [FIX] Show username in Login Mails 2014-01-22 12:18:51 +01:00
xisi
13e6c43ba5 add notify_email to accounts table and getUserNotifyEmail() method in user class 2014-01-20 04:30:17 -05:00
xisi
9ecd8d4d3e added signup_timestamp to accounts table
added getSignupTime() method to user class
added 014_accounts_update.sql and updated 000_base_structure.sql
incremented db version
2014-01-20 04:30:17 -05:00
xisi
15eca659b9 fixed a bug in edit account template
moved csrf token to above template in smarty assigns
fixed a bug in user class
remove small login/fix header to catch up
2014-01-20 04:30:17 -05:00
xisi
8756036646 cleaned up account edit csrf slightly
added csrf protection to workers under sitewide config
added csrf protection to notifications under sitewide config
added csrf protection to invitations under sitewide config
cleaned up login page csrf
cleaned up contactform/contactform page
cleaned up register/register page
moved config->csrf->forms->register to sitewide
added login ip/user/time to notification on login
2014-01-20 04:29:45 -05:00
xisi
a56140ca84 Moved csrftoken stuff into a class
added getCurrentIP method to user class
added config option for sitewide csrf protection
2014-01-20 04:26:04 -05:00
Sebastian Grewe
63960e2e62 [IMPROVED] Allow e-mails only for login
This is a major change in MPOS. Usernames will not be allowed anymore.
This will avoid a lot of brute force issues since usernames are not a
valid login method anymore.

Fixes #1345 once merged.
2014-01-16 14:40:51 +01:00
xisi
e7725399c2 change function name for sending 2f emails 2014-01-16 05:55:57 -05:00
xisi
8736123df2 improved bad csrf token error message
cleaned up wording of config
improved leadtime defaults in getCSRFToken
2014-01-16 05:55:57 -05:00
xisi
2d0938b35b [ADDED] Simple CSRF protection tokens
* Adds config options for disabling, timeout lead time, and forms
 * Adds another salt in config that's used in the token
 * Adds protection for login form by default
2014-01-16 05:55:57 -05:00
xisi
8ed8338b3e fixed my incorrect use of notif settings array 2014-01-16 05:53:36 -05:00
xisi
f3a6d65eab send notifications on successful login when active 2014-01-16 05:53:36 -05:00
xisi
96b734edaa fix how late we delete tokens for 2fa 2014-01-16 05:53:36 -05:00
xisi
d9d678be61 retooled most of the email confirmation setup 2014-01-16 05:53:36 -05:00
xisi
bfd803ec28 Incremented version, moved config options, return vals fixed in 2f checks 2014-01-16 05:42:43 -05:00
xisi
ef904858ae [Addition] E-mail confirmations for user actions
* If enabled, sends e-mail to confirm user withdraws, edits and pw changes
 * Adds 4 config options, enabled + individual settings
 * Adds 3 new token_types
2014-01-16 05:42:43 -05:00
Sebastian Grewe
4fe46cbd2a [ADDED] last_login timestamp
* [RENAMED] sessionTimeoutStamp to last_login
* [UPDATE] user class to store login time after successful login
* [ADDED] SQL Upgrade file for new column
* [UPDATE] Updated base SQL file

Fixes #1162 once merged.
2014-01-11 20:32:45 +01:00
Sebastian Grewe
2417ee7c4f [FIX] Log SQL errors on invalid checkUserPassword
Fixes #1366 once merged.
2014-01-11 19:28:37 +01:00
Sebastian Grewe
f98d08df83 [SECURITY] Fixing XSS in PHP_SELF
Fixes #1364 once merged.
2014-01-11 19:01:14 +01:00
Sebastian Grewe
627b7a17ff [FIX] Catch jsonRPC exceptions
Fixes #1339 once merged.
2014-01-10 16:20:24 +01:00
Sebastian Grewe
8fcd59eeea [ADDED] Account unlock mail on failed PIN 2014-01-02 13:28:33 +01:00
Sebastian Grewe
878fa1c1c8 [IMPROVED] Unlock notification mails on auto-locks
* Added new token type: account_unlock
* Added update SQL File
* Updated base structure with new token type
* Added empty template
* Updated user class to send mail on failed passwords
* Added unlock account page to use tokens

Addresses #670
2014-01-02 11:51:22 +01:00
Sebastian Grewe
67a6d9aff4 [UPDATE] Coding style 2014-01-02 11:05:07 +01:00
Sebastian Grewe
4c3421cc8a Merge pull request #1165 from Neozonz/issue-1164
Initial commit for pin reset functionality
2014-01-02 02:02:37 -08:00
Sebastian Grewe
ee02445b7d Merge branch 'issue-965' into next
Conflicts:
	public/templates/mpos/master.tpl
2013-12-31 16:27:16 +01:00
Neozonz
5e401bd6dd fixed indent 2013-12-30 09:17:22 -08:00
Neozonz
e3db7e0a02 Initial commit for pin reset functionality 2013-12-30 03:29:20 -05:00
poolpm
c9215475b0 [FIX] Wrong behavior on Edit Account with no addy
When an account is edited and no payment address has been set, the following non-sense message appears:
Unable to connect to RPC server for coin address validation

This patch fixes the issue and allows profile to be edited with no payment address
2013-12-27 16:21:25 +01:00
Sebastian Grewe
b16d9afcad [SECURITY] Fixed exploit in token types
Fixes an exploit due to missing check of token type used.

Fixes #1118 once merged.
2013-12-27 00:21:22 +01:00
Sebastian Grewe
f465bda350 [ADDED] Accept TaC during registration 2013-12-12 10:11:44 +01:00
Sebastian Grewe
6315d8fe03 [FIX] Validate coin_address on account updates
Fixes #945 once merged.
2013-12-10 16:53:56 +01:00
Sebastian Grewe
256b5f59c6 [IMPROVED] Lockout user on invalid pin/password
This will lock a user account if a password or PIN has been entered
wrong for multiple times in a row. When unlocking the account via admin
panel, both counters are reset so the user can log in again.

This should fix issues with brute force attacks to access user accounts.

Please see configuration dist file for new config options.
Please import SQL upgrade 007 to add new column to user accounts table.

Addresses #670 and should be merged once tested.
2013-12-07 22:14:14 +01:00