Commit Graph

49 Commits

Author SHA1 Message Date
Sebastian Grewe
5b50422675 Fixing XSS for user registration 2013-07-11 15:49:08 +02:00
Sebastian Grewe
307c7ee23f Enforce unique account emails
* display an error if user tries to re-use an email address
* moved SQL files to indicate the order of SQL import
* added unique email index SQL file

This will address #389, still needs email validation.
2013-07-06 17:47:50 +02:00
Sebastian Grewe
9b81d48e72 Fix PHP Warning on user login
While at it, I also extracted the hash function into it's own getHash
method. This will allow easy changes to hashing for string in the
future.

Fixes #382
2013-07-05 22:56:22 +02:00
Sebastian Grewe
8056ce9f87 Adding input check for AP and Donation
Fixes #354
2013-07-04 12:42:03 +02:00
Sebastian Grewe
ce5a8f7240 Fix PHP Warnings on Password Reset page
* Added HTML5 required to username field
* Added empty string check to resetPassword method

Fixes #348
2013-07-03 14:25:14 +02:00
Sebastian Grewe
e1c5761cf4 Fixing strict PHP warnings when registering a user
Fixes #329
2013-07-02 20:59:03 +02:00
Sebastian Grewe
535f13c184 Fixing PHP Warnings in Registration page
* Fix API Key generation not using SALT when creating hash
 * This should not affect existing API keys since hashes are compared
* Fix PHP Warning for RECAPTCHA if disabled

Fixes #328
2013-07-02 10:38:23 +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
d630329055 Display error message to user on failed logins
Warn a user with an error that there have been failed login attempts
for their account. Login errors can be cleared by clicking on the URL in
the message itself.

Fixes #240
2013-06-23 20:58:42 +02:00
Sebastian Grewe
0817befaaa Further cleanup to reduce PHP notice warnings 2013-06-14 13:51:06 +02:00
Sebastian Grewe
5d356b5c4f Adding counter for failed login attempts
* Track failed login attempts of a user
* Reset failed attempts as soon as the login succeeded

Fixes #182
2013-06-13 15:26:23 +02:00
Sebastian Grewe
bfaa0a67ef Enforce session logout if IP address changed
Fixes #179
2013-06-13 13:59:45 +02:00
Sebastian Grewe
6a5f938895 Store Users IP address in accounts after login
Fixes #177
2013-06-13 13:46:32 +02:00
Sebastian Grewe
44851e35df Add admin/lock changes to admin panel
* Add clickable boxes for Admin and Locked status for all users
* Change status via Ajax call, script embedded to the admin page

Fixes #147
2013-06-13 11:36:28 +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
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
9e74175ca3 Make email mandatory during registration
Partially addresses #142
2013-06-10 10:45:46 +02:00
Sebastian Grewe
4da9fd2369 Working notification system
* Added things to mail templates
* Modified user password reset call for new mail template
* Added BASEPATH to smarty code to ensure templates are compiled in the
  proper directory
* Updated mail and notification class
* Updated notification cron
* Added notification cron to run-cron list
2013-06-07 15:36:35 +02:00
Sebastian Grewe
6c4fb84ee9 Adding min/max threshold configuration
* Check for min/max values set for auto payouts
* Display error messages to the user
* Sanitize values just in case we fall through the validation
* Updated template and class
* New configuration option added! Update your local configs!

Fixes #108
2013-06-05 09:11:25 +02:00
Sebastian Grewe
065f5e6d16 Adding working user admin panel to query user DB
* Users are all fetched from the DB
* Each user is assigned special stats
 * Hashrate
 * Shares
 * Balance
 * Est. Payout
 * Est. Donation
* Display in sortable and paginated table

This is not well optimized. Each user stats are grabbed individually
via the stats and transaction classes. It would probably make sense to
expand the statistics class to list a full user list with all statistics
available instead to cover this in a single SQL query.
2013-06-04 11:34:22 +02:00
Sebastian Grewe
ed0853202b Initial file import for admin panel
* Added isAdmin to user class
 * Run isAdmin on EACH page to ensure admin status hasn't changed
* Added main page with no content
* Added user query page with basic form, no content
2013-06-04 09:15:55 +02:00
Sebastian Grewe
b5ab1a02fb Adding more in-line documentation and some cleanup 2013-05-30 09:55:21 +02:00
Sebastian Grewe
69b2c2f517 Properly abort API calls if api_key is invalid
* Fixes an issue where any api_key would be validated
* Now returns user ID upon success, aborts script processing with error
  on fail
2013-05-29 12:41:53 +02:00
Sebastian Grewe
2548d4b03d add API key back to account details
Fixes #73.
2013-05-28 15:35:28 +02:00
Sebastian Grewe
a2eb5cc7b3 Register first user as admin
This commit fixes #50 and is needed for the admin panel
2013-05-28 14:33:03 +02:00
Sebastian Grewe
1e54a1a2d6 initial commit of a working API page 2013-05-28 10:13:26 +02:00
Sebastian Grewe
93d0ec06a6 adding proper headers for HTML mail 2013-05-25 12:25:41 +02:00
Sebastian Grewe
787942b6f9 working version of password reset with one time token 2013-05-25 12:08:51 +02:00
Sebastian Grewe
841d986726 initial work on password reset, not working fully yet 2013-05-25 10:58:53 +02:00
Sebastian Grewe
1bdf5e3156 added some more debug output for profiling 2013-05-23 10:02:11 +02:00
Sebastian Grewe
e4732f55ca adding support for user donations, added all required changes into this commit 2013-05-20 19:38:21 +02:00
Sebastian Grewe
65bcabbd28 removing argument table 2013-05-20 16:31:37 +02:00
Sebastian Grewe
0e3ebe6bde adding auto-payout cronjob 2013-05-20 16:29:11 +02:00
Sebastian Grewe
aadeac9f86 properly search using getSingle, missed search field type 2013-05-15 18:11:06 +02:00
Sebastian Grewe
649b527a8f further moved stats from user into statistics class, added more caching 2013-05-15 01:07:59 +02:00
Sebastian Grewe
1390c12a5d updated user class, removed hashrate and added getTableName 2013-05-14 23:57:52 +02:00
Sebastian Grewe
dfc1af4965 get both valid and invalid user shares 2013-05-14 12:45:00 +02:00
Sebastian Grewe
e316622327 quickly added user hashrate and shares, dirty but working, better to cache those 2013-05-14 00:07:28 +02:00
Sebastian Grewe
ece3d8fd25 adding block statistics, added finder and round shares for blocks, updates transactions for new columns, updated template and pool statistics code 2013-05-13 09:21:41 +02:00
Sebastian Grewe
3844bbe1ab cleaned up getSingle calls, added getCoinAddress method 2013-05-12 16:56:11 +02:00
Sebastian Grewe
1194c7fb33 fixed user class, missing method 2013-05-12 12:18:56 +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
2e8d475e6f fixing PIN storage and added missing unique on username to DB structure 2013-05-12 00:21:03 +02:00
Sebastian Grewe
dae7fe3397 fixing user registration, adding new DB layout for accounts 2013-05-12 00:05:49 +02:00
Sebastian Grewe
9dcdc91a7f updated account template and user class to work with simplified accounts table 2013-05-11 20:16:32 +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
dfc4aafeaa some smaller updates to classes and PHP codes 2013-05-10 15:28:05 +02:00
Sebastian Grewe
1b50f76f72 initial import of file base of my WIP 2013-05-06 14:11:38 +02:00