Commit Graph

147 Commits

Author SHA1 Message Date
Sebastian Grewe
324bf05116 [FIX] Better error message
Fixes #1664
2014-02-06 10:51:00 +01:00
Sebastian Grewe
bfbb8c83b7 [FIX] Account Update with same coin address 2014-02-05 15:29:52 +01:00
Sebastian Grewe
bc0d340bf3 Merge pull request #1642 from MPOS/payout-overhaul
[IMPROVED] Payout logics
2014-02-04 21:59:22 -08:00
Sebastian Grewe
43e1c44def Merge pull request #1646 from xisi/security-logging
[ADDITION] Basic security logging
2014-02-04 08:05:13 -08:00
Sebastian Grewe
e59d3a8e25 [FIX] Address Validation in user class 2014-02-03 08:16:59 +01:00
Sebastian Grewe
c00b6d6757 [IMPROVED] Payout logics
* [ADDED] More methods to our transaction class
 * `createDebitAPRecord` and `createDebitMPRecord`, will handle the
 * entire debit process
  * Adds Debit transaction
  * Adds TXFee transaction
  * mark transactions as archived
  * validate user is fully paid out
  * send notification to user
 * `getMPQueue` was added to unify the process of getting payout queues
* [MOVED] Only one mail template for both payout methods
* [ADDED] Some minor calls to user class
* [ADDED] Full address validation to bitcoin class
* [SQL] New SQL upgrade and Version Increment
 * Adding UNIQUE index to coin_address in accounts table
 * preperation for `sendmany` implementation
2014-02-03 08:16:58 +01:00
xisi
18c7565e5c cleanup 2014-02-02 13:34:41 -05:00
xisi
ca1ae6ba2c wrapped KLogger 2014-02-02 11:57:06 -05:00
Sebastian Grewe
656a92d286 Merge pull request #1651 from rog1121/patch-4
Locked Account Message
2014-02-01 13:14:22 -08:00
rog1121
07d49b0956 Locked Account Message 2014-02-01 12:35:48 -07:00
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