Commit Graph

60 Commits

Author SHA1 Message Date
xisi
9dcb855b34 strict class, trying to figure out why edit account doesnt work 2014-01-28 06:18:57 -05:00
xisi
3006cb544f Reworked csrf tokens, now enabled globally
The way this now works is, if csrf is enabled:
 * Any new or existing template can have csrf protection by adding the hidden input ctoken that's in this batch to its form, removes any logic in templates
 * Page controllers that already exist have been updated, new ones only require checking if csrf is enabled and valid
2014-01-24 13:00:24 -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
xisi
a3314fa81e Cleaned up login page logic a bit more
Fixed up CSRF tokens so rollover minutes/hours are now checked and valid
2014-01-23 11:01:30 -05:00
nonstopmine
bab002d9f8 Update edit.inc.php
txfee is old variable, replaced with txfee_manual
2014-01-20 22:32:04 +02:00
xisi
fd49e0eb78 disabled is actually correct to use in cash out form, we want the css props
slightly optimization
2014-01-20 04:41:13 -05:00
xisi
03e0b2e51d request fiddling 2014-01-20 04:41:13 -05:00
xisi
76a67cb71a Changed the config options for CSRF/disabling forms
* Now an array to disable with granularity
 * Fixed all CSRF tokens back to 1 min
 * Added CSRF protection for unlock account
 * Unified error message for all csrf tokens
 * Fixed a few issues with last commit
2014-01-20 04:41:13 -05:00
xisi
5e5e751271 switched account edit csrf token to 1 min now that saving works on an incorrect entry 2014-01-20 04:40:38 -05:00
xisi
cc6e58084f Fixed an bug where a notice could be thrown on the edit page under the right conditions
Cleaned up login page logic which should fix #1459 & #1461
Fixed a bug in tools class where an incorrect config setting could throw a notice
2014-01-20 04:40:38 -05:00
xisi
62e341b877 finally cleaned up the edit account page to my liking
fixed change I made to test a fix for someone who was having issues
2014-01-20 04:38:53 -05:00
xisi
fed3981979 fixed isTokenValid, started work on edit fixes, recaptcha fix test 2014-01-20 04:38:25 -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
e5c9720174 Finished cleanup of account edit page
added csrf protection to account edit page under sitewide config
escaped all instances of CTOKEN for csrf in smarty templates
2014-01-20 04:29:13 -05:00
xisi
9ccb5e15bc refactored old token usage in account edit page 2014-01-20 04:27:58 -05:00
xisi
e7725399c2 change function name for sending 2f emails 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
802930cba1 save old token to use in case we error out 2014-01-16 05:53:36 -05:00
xisi
ed8349ef50 works as far as I can tell 2014-01-16 05:53:36 -05:00
xisi
40d09a4ee4 oops, forgot to make sure we're auth'ed 2014-01-16 05:53:36 -05:00
xisi
a598eec924 fix sync changes done in edit.inc.php at the end of request 2014-01-16 05:53:36 -05:00
xisi
1b1f552567 fix cosmetic issue #2 2014-01-16 05:53:36 -05:00
xisi
a0ecbd0294 fix cosmetic issue 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
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
nicoschtein
064dfe09df Changed txfee to txfee_manual in account/edit.inc.php 2014-01-14 19:16:27 -02:00
Sebastian Grewe
67a6d9aff4 [UPDATE] Coding style 2014-01-02 11:05:07 +01:00
Neozonz
e3db7e0a02 Initial commit for pin reset functionality 2013-12-30 03:29:20 -05:00
Sebastian Grewe
0d6ee6d821 [IMPROVED] Auto/Manual Payout Disabled
This will re-add the ability to disable auto or manual payouts. Option
to disable the entire cronjob is left intact.

Fixes #1034 when merged.
2013-12-19 15:17:29 +01:00
Sebastian Grewe
afb5fc6c0d [CHANGED] Merge payout crons
* Merge manual and auto-payout into single cronjob
* Update template/code to reflect single payout cron
* Update monitoring page
* Update disable payouts option in admin panel settings
* Update account payout page to use new option

This will fix #967 once merged.
2013-12-12 11:45:33 +01:00
Sebastian Grewe
6a693ea25e [FIX] Account Lockouts on Edit Account page
Fixes #939 once merged.
2013-12-10 16:14:44 +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
Sebastian Grewe
7209f570f4 properly fetch account balance 2013-07-23 14:16:20 +02:00
Sebastian Grewe
ee5e2c46c6 Adding manual payout cron
This will avoid double payouts via the website. Payouts will be
requested by users and processed by a cron. If, for whatever reason,
users do add two requests (it is checked if a payout exists) they would
only have one successful payout until their account balance is back up
to a save value to trigger the payout.

This should fix any issues with manual payouts being exploited through
the website. Will require some testing by others to ensure things work
as expected.
2013-07-22 16:14:22 +02:00
Sebastian Grewe
7fce187ab0 Admin Panel Setting to disable/enable AP/MP
This will allow admins to temporarily or permanantly enable and disable
auto and manual payout processing.

Fixes #488
2013-07-19 11:12:28 +02:00
Sebastian Grewe
8ec1d2cab3 Adding anonymous account support
* Added anonymous flag to accounts table
* Added checkbox for anonymous flag in edit account page
* Updated user class to support new flag
* Updated statistics class to support anonymous and donations
* Updated all templates showing usernames to show anonymous instead
* Added new SQL `ALTER TABLE` file for upgrading the table

Fixes #419 once merged.
2013-07-12 10:33:42 +02:00
Sebastian Grewe
0c014da726 unknown index PHP warning fix 2013-07-10 10:44:10 +02:00
Sebastian Grewe
94d9c1eb4c Added cronjob monitoring to admin panel
* Added monitoring class to deal with monitoring events
* Added event calls to all important cronjobs
* Added cron_end include file for monitoring cleanups on successful runs
* Added Monitoring to autoloader
* Modified account page to check for running auto_payout in monitoring
* Added monitoring to Navigation bar
* Added monitoring controller page

Fixes #415
2013-07-10 10:40:11 +02:00
Sebastian Grewe
2dd333b5d8 Changing wallet error message from litecoind
Since plenty scrypt based currencies are supported, changed error
message to say `wallet` instead of `litecoind` when failing to connect
to RPC service.
2013-07-01 12:47:33 +02:00
Sebastian Grewe
9bde3d979c removed whitespace 2013-06-17 11:19:05 +02:00
Sebastian Grewe
fa7f61c436 Adding transaction fees to transaction class
This will add back the transaction fees. Prior to this commit the pool
had to cover the transaction fees. Now for each transaction the full
balance is transferred (RPC Daemon will remove the TX Fee) but two
transactions are added. One for the Debig and one TXFee.

Fixes #203.

**Requires database upgrade with supplied SQL file**
2013-06-17 11:17:15 +02:00
Sebastian Grewe
0817befaaa Further cleanup to reduce PHP notice warnings 2013-06-14 13:51:06 +02:00
Sebastian Grewe
42b6d4b3b2 Adding support for user locking
* Currently no GUI, use DB access to change the row entry
* Upgraded Database table `accounts` with upgrade SQL
* Updated `admin` field to `is_admin` as boolean
* Modified pages, classes, templates to support is_admin and is_locked

Addresses #147
2013-06-13 11:36:28 +02:00
Sebastian Grewe
8859f0c091 forgot to add the actual files :/ 2013-06-13 09:21:08 +02:00
Sebastian Grewe
13fc01243e Adding configurable currency name to global config
Addresses #138
2013-06-13 09:21:07 +02:00
Sebastian Grewe
a006ea782a Adding confirmed and unconfirmed balance
* Added SQL code to support both balances
* Added sidebar entries
* Modified auto_payout to use new index
* Mofified account page to use new index

Addresses #140 but needs to be tested!
2013-06-12 09:13:14 +02:00
Sebastian Grewe
b1d698e686 Allow users to change their email address
* Added email to account page
* No confirmation required as of yet

Fixes #142
2013-06-10 10:54:57 +02:00
Sebastian Grewe
b1f3c9bece Fixing manual payout race condition
* Mark manual payout active
* Run payout logics
* Reset manual payout

This ensures only one manual transaction can be run at a time.
If any users starts a manual payout others have to wait until the site
completed loading and finished the transaction process.

As long as we don't have too many users doing a manual payout at the
same time this should not be an issue. Best for users is using auto
payouts anyway.

This addresses #149
2013-06-10 10:38:05 +02:00
Sebastian Grewe
463f199040 Update edit.inc.php
Emergency fix: Transactions are not aborted if RPC transfer failed.
2013-06-10 11:31:49 +03:00