Commit Graph

47 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
f298c60260 little more cleanup
put version check/config check after sessions/rate limiter so it works correctly & only uses 1 db hit
2014-01-29 09:16:03 -05:00
xisi
f56c18276a small fixes 2014-01-28 07:26:33 -05:00
xisi
6398e5dfec merged session manager/memcache limiter
cleanup for PR
2014-01-28 07:26:33 -05:00
Joey
493c43e0ed updated check in autoloader so default needs to be changed if SECHASH_CHECK is enabled 2014-01-28 07:26:32 -05:00
xisi
b728b680ca blah blah 2014-01-28 07:26:08 -05:00
xisi
9dcb855b34 strict class, trying to figure out why edit account doesnt work 2014-01-28 06:18:57 -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
78beb8b674 [UPDATE] Added index call checks where missing 2014-01-14 11:05:41 +01:00
Sebastian Grewe
2568ced4d4 [INITIAL] Working version checks
* Check DB structure version, config file version and MPOS core version
* Added new Admin Dashboard to show this core information
* Cronjobs will be disabled if SQL files are not imported
 * SQL files must re-set the db_upgrade_required setting
* Cronjobs will disabled if config files are not updated
 * Simple config file update and version string update will fix this
* Added MPOS status overview
 * Cronjobs and Wallet information for now, others may be added later
* Added new navigation link for Admin Panel Dashboard
* Added new version file
 * Will require updates whenever DB or configs are updated
* Update SQL file that adds the DB_VERSION setting

This will address #1242 and already includes a huge chunk of changes
required to make this work.
2014-01-05 11:19:09 +01:00
Sergey Kukunin
1aee65859f Make Smarty search template in database first
If not, fallback to file template
Implement normalizer to convert gettingstarted/../support/default.tpl to support/default.tpl
2013-12-09 20:55:58 +02:00
Sergey Kukunin
75c7e0fc6d Implement Templates admin page
Create `templates` table in database
Add navigation links to Template page
Let admin to manage his templates from adminpanel
2013-12-09 20:55:58 +02: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
f67e63b6fc [REFACTOR] Refactored classes for error handling
* [ADDED] More error codes
* [MODIFIED] Class updates to use Base Class all the time
* [MODIFIED] Cronjobs have been slightly adjusted
* [ADDED] More base class features
2013-11-05 14:34:31 +01:00
Sebastian Grewe
ae45939fea [IMPROVED] Re-factored monitoring criticals/errors
* [ADDED] new monitoring method : endCronjob
* [IMPROVED] Use newly added error codes
* [ADDED] mail notifications, enabled by default
* [ADDED] cron disable on fatal errors with exit code != 0
* [ADDED] Command line swtich: -f = Force running crons even if disabled
* [ADDED] Disabled status in monitoring site

This will improve error handling in our cronjobs. Fatal errors now
require manual intervention by explicityly running crons with the force
option (`-f`). Until they are forced to run, crons will stay disabled.

Fixes #773 once merged
2013-11-05 07:28:07 +01:00
Sebastian Grewe
a6f9c25b5b [UPDATE] Proper implementation of target bits
* [ADDED] New Config Option: Algorithm
 * scrypt and sha256d supported right now
 * might add SHA coin support across MPOS
 * Compatible with previous implementation
* [REMOVED] config option: pps_target
 * Replaced by config option: algorithm
 * Please update your config, defaults to srypt now!
* [ADDED] Unpaid Shares in Dashboard
* [MODIFIED] User estshares from DB query instead template math
2013-10-26 14:10:34 +02:00
Sebastian Grewe
02c9be54ed [MAJOR] Changing project name to MPOS
* Adjusted mmcfe-ng occurences in code
* Adjusted Database strucutre to only supply the full structure
* Adjusted default template to MPOS

Addresses #643
2013-10-07 10:10:49 +02:00
Sebastian Grewe
4954f14923 Merge branch 'next' into issue-444-theserapher 2013-09-18 11:03:07 +02:00
Sebastian Grewe
a0fa71b264 [IMPROVEMENT] Adding incremental round/user shares
This will address #510. It needs thorough testing and is a WiP but
is a start to improve cron runtime and DB loads.
2013-09-18 09:45:52 +02:00
Sebastian Grewe
4ffca7d5ac API overhaul for easier handling of API calls
* [FEATURE] Allow in-class checking for user permissions
* [FEATURE] Allow in-class creation of the JSON data for coherence
* [FEATURE} Added API version in JSON data for client side checks
* [IMPROVEMENT] Adjusted all API calls to use the new JSON layout

**NOTE**: This is breaking backwads compatibility with the old API!
Please adjust your client application to support this new version.
The data array should not change much more other than added features.
2013-09-17 11:55:54 +02:00
Sebastian Grewe
ab6a4f57d3 further implemetation into mmcfe-ng 2013-09-06 10:29:42 +02:00
Sebastian Grewe
7ec8fa9b95 Moving a lot of settings from config to adminpanel
* Migrated configuration options to admin panel
* Removed configuration options from config file
* Added help text for each configuration option into panel

Addresses #622 and needs extensive testing by pools. A lot has changed
so pool owners might have to adjust their own templates to match this
new system.
2013-08-20 12:02:47 +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
d492b532b7 Adding ability to disable the sites API functions
Addresses #467 and will fix upon merge.
2013-07-17 09:43:02 +02:00
Sebastian Grewe
bd32dfa9f8 Adding invitation system to mmcfe-ng core
This will allow users to send invitations to other people via email.
Each account will still need to confirm the email address if the option
is enabled.

Addresses #330, will need to allow pool operators to enable this feature
even with registrations turned off.
2013-07-15 12:26:31 +02:00
Sebastian Grewe
0ede05a6fd Adding email verification
* Adding mail verification during account registration
* Added new dist file option for mail verification
* Added account confirmation page using tokens
* Added mail class into user class for password resets
* Moved password reset template
* Adjusted account registration page
* Adjusted user class for email confirmation

Also fixed a bug with smarty_cache_key not being used properly if smarty
is disabled. Key still needs to be available even if caching is disabled

Addresses #330 and prepare the ticket for invitation only system.
2013-07-15 12:26:31 +02:00
Sebastian Grewe
29d5d36a7e WiP for one time tokens
* Added token type class
* Storing Token Type as ID not varchar
* Added new system to user class and fixed issues with it
* Started on mail verification process in user class
* Updated autoloader
* Updated change password template

Addresses #330
2013-07-15 12:26:31 +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
0f69032fd3 Adding 3rd party Scrypt library
This will allow us to start checking a blockhash against a solution
submitted to the database.

Details on this in the ticket. Just a WIP to save file states.

Addresses #405
2013-07-08 17:10:58 +02:00
Sebastian Grewe
6dc795fd77 Improved cron logging via logfiles
* Added 3rd party logger library KLogger
* Adjusted all cronjobs from verbose output to logging
* Added new logs folder for crons to write to
* Added new .gitignore for logs folder data
* Updated blocks class to only fetch blocks with no share_id
* Adjusted findblocks to use no blocks class method
2013-07-07 22:04:43 +02:00
Sebastian Grewe
7390ca38e5 Enable or Disable maintenance and registrations
This will allow any admin to enable or disable a pool maintenance mode.
Regular users that are still logged in will not be kicked out (yet). New
users that are trying to login and are not admins will be denied access.

Also added registration option to Admin Settings via WebUI. You can now
disable new accounts via web option or configuration setting.

Fixes #259 but also adds an additional feature.
2013-06-30 12:03:46 +02:00
Sebastian Grewe
d4f4b9073f Working jQuery Mobile frontend for mobile devices
* Added mobile device detection PHP library
* Call PHP library to decide which theme to use
* Added theme as a configuration option into global config
 * Selectable Desktop theme (default: mmcFE)
 * Selectable Mobile theme (default: mobile)
 * Disable mobile theme support entirely

**NOTE**: This requires updates to the `global.inc.php` so please check
the dist file and update your config before filing a new issue!

Addresses #25
2013-06-28 13:45:14 +02:00
Sebastian Grewe
84ababe9f7 Adding support for post time and author
* Added new SQL upgrade and structure
* Added post time and author to admin panel
* Added post time and author to news list

Fixes #226
2013-06-21 12:11:13 +02:00
Sebastian Grewe
e4e88e5226 Adding custom news posts via admin panel
* Adding dynamic news posts from DB
* Support Adding, Editing, Activating, Deactivating through admin panel
* Display all active posts on news page
* Implemented Markdown Library by Michelf

Fixes #61
2013-06-21 11:16:02 +02:00
Sebastian Grewe
9ac2dadd97 Progress on notifications
* Added main mail class
* notification class extends mail class
* Added mail template for IDLE workers
* Added notification table to SQL structure

This works already but once notified the status is not reset as soon as
a worker is active again. Need to think of a system to do that
automatically.

Addresses #116
2013-06-07 15:36:35 +02:00
Sebastian Grewe
cdfb074076 Re-adding LTC/usd to website ministats header
* Use tickerupdate.php cron to update setting value
* Added new configuration variables for ticket updates
* Added some missing configuration vars for some URLs
2013-05-29 10:56:08 +02:00
Sebastian Grewe
d4331ed8dc Adding more actions for API page
* getblockcount
* getblocksfound (with limit support)
* getcurrentworkers
* getdifficulty
* getestimatedtime
* getpoolhashrate
* getpoolsharerate
* gettimesincelastblock
2013-05-28 10:50:16 +02:00
Sebastian Grewe
6ffaece837 allow caching to be more transparent and configurable 2013-05-17 16:25:45 +02:00
Sebastian Grewe
38d2d5abd7 bringing class loader in order 2013-05-13 23:29:19 +02:00
Sebastian Grewe
187fb92272 further cleaned up user class, created worker class, removed ledger and paid calls from user 2013-05-12 11:39:22 +02:00
Sebastian Grewe
4a7b51d9eb implemented transactions, PPS payouts and Transactions displayed on the website 2013-05-11 16:50:15 +02:00
Sebastian Grewe
cbfcff3ba1 adding future ledger cronjob for transaction confirmations 2013-05-11 09:17:43 +02:00
Sebastian Grewe
3971ea797c further work on sharecounter cron, almost all features available now 2013-05-11 09:15:19 +02:00
Sebastian Grewe
571e26413b adding new share class 2013-05-10 22:36:42 +02:00
Sebastian Grewe
b9904a5eee properly use BASEPATH in global config, created shared file for crons 2013-05-10 19:59:54 +02:00
Sebastian Grewe
ef4b9fd21d adding new cronjob to find generated or immature blocks, changed project to allow scripts to run outside of webroot 2013-05-10 19:46:54 +02:00