Commit Graph

160 Commits

Author SHA1 Message Date
Sebastian Grewe
8651cd38ad [FIX] Changing Cookie Domain 2014-03-08 08:41:00 +01:00
iAmShorty
59b7c364fd [FIX] coin_address is string, not int
throws a mysql error when updating coin address in user settings
2014-03-06 15:01:27 +01:00
Sebastian Grewe
3e64dd3487 Merge pull request #1798 from MPOS/x-forwarded-for-check
[CHANGED] Parse X-FORWARDED-FOR when supplied
2014-02-26 09:53:29 +01:00
iAmShorty
55266e274a [UPDATE] added pagination to reg and invite 2014-02-24 11:24:13 +01:00
iAmShorty
0f9cdb915c [UPDATE] fixed typo in sql queries 2014-02-24 10:58:23 +01:00
iAmShorty
d419b1f0ff [UPDATE] sorting by count 2014-02-24 10:56:47 +01:00
iAmShorty
37b8d5a56b [UPDATE] changed hardcoded table names 2014-02-24 10:52:12 +01:00
iAmShorty
fbdd811d7f [UPDATE] added top inviter, some code cleanup 2014-02-24 10:39:09 +01:00
iAmShorty
d0a82be11b [UPDATE] adding if user was invited and inviter to registered users 2014-02-23 22:30:52 +01:00
iAmShorty
23afae0aaf [UPDATE] added last 10 registered users to dashboard 2014-02-23 21:35:20 +01:00
Sebastian Grewe
8bd469ba5d [CHANGED] Parse X-FORWARDED-FOR when supplied
Instead of trusting REMOTE_ADDR we should parse X-FORWARDED-FOR if
supplied. This will properly use the user IP in a multi-LB setup.

Needs testing
2014-02-19 14:32:20 +01:00
Sebastian Grewe
6a55506b0c [IMPROVED] Logging format
* Added IP address to all log output
* Added Page and Action to all log output
* Modified log messages
* Added Error and Fatal handlers
* Raised failed logins to Error
* Added KLogger default log levels
* Made it most verbose
2014-02-07 10:14:56 +01:00
Sebastian Grewe
93470fd63e [FIX] Suppress potential empty HTTP_USER_AGENT 2014-02-06 16:34:06 +01:00
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