Commit Graph

3700 Commits

Author SHA1 Message Date
David Anderson 5094a24ce1 Leiden Classic queuing system: fix security vulnerability 2014-11-22 13:18:03 -08:00
David Anderson 6b9205b3a1 web: fix SQL injection vulnerability in remote job submission
Also cast ID to int in lookup_id.
This isn't a vulnerability AFAIK, but doesn't hurt to be safe
2014-11-21 15:37:40 -08:00
David Anderson 21b7b898fa web: fix SQL injection vulnerability 2014-11-20 11:04:22 -08:00
David Anderson c2e5a210a4 web: add BoincDb::reset_connection(): clears connection variable
If your connection to the BOINC DB times out,
call reset_connection(), which clears the static member,
then call get() again.
2014-11-10 21:54:27 -08:00
David Anderson 7a044d070c web: try to get server_status.php to work w/ remote daemons. Not done yet. 2014-11-07 00:56:40 -08:00
David Anderson 28ef0e3974 web: for non-computing projects, omit login-with-auth form 2014-11-06 11:18:04 -08:00
David Anderson cebd2f853a web: notify subscribed users if post is moved into a thread 2014-11-03 12:37:16 -08:00
David Anderson f21159e9bf server_status.php: attempts at making it work across hosts 2014-11-01 22:56:47 -07:00
David Anderson db6592e6fc admin web: fix bug in "delete user" function
Also:
- use "admin_error_page()" instead of "error_page()" in admin pages
- add footer w/ Main Page link to admin pages
- code cleanup in delete user function
2014-10-29 12:25:35 -07:00
David Anderson ae1b16914f web: don't use persistent connections with mysqli
I recently changed the web code to use the PHP mysqli interface if available.
I noticed that it often get "can't connect - too many connections" errors,
even on small projects.
This is probably due to the use of persistent connections, so I took that out.
2014-10-21 22:12:03 -07:00
David Anderson 907ff357f6 web: show graphic notices if user agent is not BOINC client 2014-10-21 09:57:22 -07:00
David Anderson 1e65aa073f web: fix bugs that prevented notices with images/videos from being sent 2014-10-21 09:50:44 -07:00
David Anderson 3136342575 GPU list script: fix bug, and include anonymous platform hosts 2014-10-19 22:35:17 -07:00
David Anderson a26f310f1e web: optionally use stopforumspam.com to check email addresses
if the constant USE_STOPFORUMSPAM is set to true (in project.inc)
BOINC will check a database of known spammers before creating an account.
2014-10-19 20:12:07 -07:00
David Anderson 625aef4718 LDAP auth: bug fix 2014-10-19 09:32:59 -07:00
David Anderson 267ef49789 delete_spammers.php: add --user_url option
This deletes accounts with a nonempty URL, no hosts and no forum posts.

Also fix typo in util.inc
2014-10-19 00:29:50 -07:00
David Anderson d0fb0184e8 client/manager/server: finish LDAP support
- get_project_config.php: if project supports LDAP,
  advertise this to the client.
- Manager: if project supports LDAP, say "Email address or LDAP ID"
  in Attach Project wizard,
  and don't do email address validation.
- lookup_account GUI RPC (client side): if passing an LDAP ID,
  don't lowercase it, and don't hash passwd
- lookup_account GUI RPC (server side): if passing an LDAP ID,
  pass appropriate URL args to Web RPC
- lookup_account Web RPC: in LDAP case, pass "ldap_auth" arg,
  and pass "ldap_uid" and "passwd".
  Handle these appropriately.
2014-10-18 23:53:27 -07:00
David Anderson 109f8a7463 web: preliminary support for LDAP authentication.
- To use, projects must add LDAP server info in project.inc; see
 http://boinc.berkeley.edu/trac/wiki/LdapSupport
- Users can use LDAP name/passwd in login form.
  The handlers creates a BOINC account if needed.
- In user page, show LDAP UID instead of email address.

Also, much-needed code cleanup in login_action.php
2014-10-18 13:53:36 -07:00
David Anderson 599f05db58 web: fix PHP warning 2014-10-13 09:15:46 -07:00
David Anderson 4d8d9eb790 web: fix PHP warnings in GPU list page 2014-10-13 09:08:19 -07:00
David Anderson 11158c9418 web: try to fix include problem 2014-10-09 12:01:33 -07:00
David Anderson b9ba016d8d admin web: mysqli fix 2014-10-09 11:44:46 -07:00
David Anderson 39a2d6d496 - admin web: more mysqli fixes 2014-10-09 11:19:31 -07:00
David Anderson c0e7da4931 admin web: fix bugs related to mysqli changes 2014-10-09 09:29:05 -07:00
David Anderson 40d68bc688 server: when deleting user, remove related DB records
When deleting a user (from the delete_spammers.php script),
remove records that refer to that user in
private_messages, notify, credit_user, badge_user, and friend tables.

Notes:
- This change eliminates some dangling references,
  but in general a BOINC DB doesn't have referential integrity.
  The code should check for dangling references.
- Functions like BoincUser::delete() should delete a user record,
  not try to remove things that refer to it.
  The function delete_user() (in user.inc) does this.
2014-10-08 12:14:34 -07:00
David Anderson 644690b100 server: add indices for user_submit, user_submit_app tables 2014-10-08 12:13:36 -07:00
David Anderson 964d37b009 web: fix button problem on IE; from Christian 2014-10-07 05:33:39 -07:00
David Anderson 97706bf18d web: tweaks 2014-10-07 04:02:43 -07:00
David Anderson 63ab243996 admin web: call project-defined function admin_index_extra() in main page 2014-10-05 08:15:05 -07:00
David Anderson 0805cf87c3 admin web: in "result summary in last X", don't include delayed-file-delete jobs
The config option <delete_delay_hours> lets you defer file deletion.
If you set this, say, for 10 days,
then the "results summary in last 24 hours" page will show
jobs that finished 10 days ago and were file-deleted in the last day.
This is generally not what you want.
Change things so that in this case file-deleted results
are treated as if their mod time were 10 days earlier.

Note: this means that the counts of file-delete states
won't be meaningful in this case.
2014-10-05 02:17:03 -07:00
David Anderson b1bc33a39b One-click attach: cookie expire time 2014-10-05 01:31:44 -07:00
David Anderson a71ab2796a server: add --teams option to delete_spammers.php
See http://boinc.berkeley.edu/trac/wiki/ProtectionFromSpam#Cleaningupspam
2014-10-04 01:01:25 -07:00
David Anderson 2e127dd963 concierge: see if project is on list 2014-10-04 00:45:24 -07:00
David Anderson b27765f6d3 web: add mechanism for 1-click Join button on projects 2014-10-03 11:01:32 -07:00
David Anderson 620865cc1c web: fix DOS line endings in htmLawed.php 2014-10-03 07:37:17 -07:00
David Anderson f81eda0f46 web: change things so table.bordered still works 2014-10-02 14:05:00 -07:00
David Anderson eb1a9f1566 web: SETIBZH URL changed 2014-10-02 13:13:31 -07:00
David Anderson e6ecb981b3 web: change CSS usage to partly match Twitter Bootstrap. From Christian Beer. 2014-10-02 12:15:54 -07:00
David Anderson 83723b6a4c web: fix file w/ truncated lines 2014-10-02 12:15:22 -07:00
David Anderson 512ccea4ab web: use htmLawed instead of kses for HTML sanitization
kses isn't maintained, and uses the deprected %e feature of preg_replace().
2014-10-02 08:16:28 -07:00
David Anderson c764633a96 web: fix include problem
Sometimes (I don't understand why) you get "constant already defined"
warnings for constants in project/project.inc.
This is related to recursive includes.

Principle:
- include project.inc from util.inc (and nowhere else)
- include util.inc from the top-level .php file (and nowhere else)
2014-10-02 08:09:00 -07:00
David Anderson 41068fb802 web: fix explode() arg order 2014-10-02 00:54:17 -07:00
David Anderson 469b82ef0e web: allow <db_host> to include :port 2014-10-01 08:31:38 -07:00
David Anderson 2ea2077b2b web: change NO_MYSQLI feature to fix recursive-include problems
I seemed to be playing whack-a-mole with problems related to
recursive inclusions of project.inc.
Solve this by changing how the use of mysqli can be inhibited:
instead of defining NO_MYSQL in project, put <no_mysqli/> in config.xml
2014-09-28 12:15:26 -07:00
David Anderson 1c60e467a7 web: add page (per_app_list.php) to show top users/teams by app
Notes:
- it's per app, not per sub-project; that would have been harder
- it only shows the top 20

Also: shuffle code to reduce recursive includes.
2014-09-28 08:11:51 -07:00
David Anderson 087f260cae web: fix PHP warnings in apps.php 2014-09-28 01:49:07 -07:00
David Anderson cacbd3e39b web: comment tweak 2014-09-28 00:25:08 -07:00
David Anderson 6c73f71cee web: fix PHP warnings 2014-09-25 13:39:05 -07:00
David Anderson 10276d51b1 web: actually do last commit 2014-09-24 18:35:07 -07:00
David Anderson 8de9c2fac6 web: in text transform, don't re-encode entities 2014-09-24 18:30:25 -07:00
David Anderson 04686222f5 web: tweak to last commit; to not use mysqli_*, define NO_MYSQLI 2014-09-24 11:25:28 -07:00
David Anderson c02362ecd1 web: let projects not use mysqli if they want
projects may have developed a lot of PHP code that uses the
old mysql_* interface.
Let them keep using this interface by putting
define('MYSQLI', false);
in project/project.inc
2014-09-24 10:37:10 -07:00
David Anderson c8f2233c4a web: fix PHP warning 2014-09-24 10:24:30 -07:00
David Anderson 514a132bfc web: fix a couple of PHP warnings 2014-09-24 09:38:19 -07:00
David Anderson 93f7def3fa web: show badges at bottom of forum-post box 2014-09-24 00:55:03 -07:00
David Anderson 6408766057 admin web: by default don't show deprecated app versions on mgt page 2014-09-21 21:06:31 -07:00
David Anderson efa6f4e3d6 web: make badge display configurable
See http://boinc.berkeley.edu/trac/wiki/BadgeDoc
2014-09-18 10:08:45 -07:00
David Anderson a93090bce4 web: tweak processing of [code] in BBcode 2014-09-14 01:29:08 -07:00
Rom Walton 6f3fa7e39d LOCALE: Fix line feeds 2014-09-12 11:10:30 -04:00
David Anderson bbb8ae2d1d web: forums: display BBcode withing [pre] and [code].
Also, show long-ago dates (> 30 days) as the actual date
rather than "3423 days ago"
2014-09-10 15:46:58 -07:00
David Anderson 3abed383e5 web PHP code: use mysqli everywhere if available
Change all the PHP code to use _mysql_query() instead of mysql_query()
(and similar for other functions).
_mysql_query() uses the mysqli API if available, else the old API.

Going forward, all PHP code should the DB abstration layer if possible;
else it should use the _mysql_* functions.
2014-09-04 12:00:09 -07:00
David Anderson dc02b627b5 server: add PHP script to decay per-app credit 2014-09-03 22:24:25 -07:00
David Anderson 4cc760e28f locale: Update compiled localization files 2014-09-03 10:48:34 -07:00
David Anderson e689acce0c web: add Android failure rate page 2014-08-30 14:06:00 -07:00
David Anderson ea52182275 web: fix to forum email functions 2014-08-29 21:07:08 -07:00
David Anderson e7b4910213 web: skip ownerless threads 2014-08-29 13:31:30 -07:00
David Anderson 2f58137d38 web: make [pre] work in admin posts 2014-08-27 14:27:55 -07:00
David Anderson cd05b76c1f web: remove old DB calls on home and server status pages 2014-08-20 09:41:01 -07:00
David Anderson ce8e78e10e web: add script for granting badges based on per-subproject credit totals
See http://boinc.berkeley.edu/trac/wiki/PerAppCredit
2014-08-18 13:48:27 -07:00
David Anderson c4a480be29 XML stats export: fix bug in credit-by-app files 2014-08-18 10:00:59 -07:00
David Anderson 8f0893b140 db_dump: export credit_by_app files in XML stats
It does this by running html/ops/export_credit_by_app.php.
I added a cmdline arg to this script saying where to write the files.
2014-08-17 23:29:41 -07:00
David Anderson 14548a7377 web: small bug fix 2014-08-16 16:31:30 -07:00
David Anderson c39d497bae web: add sum() member for BoincCreditUser and BoincCreditTeam 2014-08-16 14:09:42 -07:00
David Anderson 126183ce19 server: add script to export per-app credit data as XML
Add an official notion of "sub-project": see
http://boinc.berkeley.edu/trac/wiki/PerAppCredit
2014-08-15 16:20:40 -07:00
David Anderson dbd2d03a0d server/web: add support for per-application credit
See http://boinc.berkeley.edu/trac/wiki/PerAppCredit
If enabled (by the <credit_by_app> config flag)
validators will maintain on a per-(app, user, credit type) basis,
and same for teams,
in new DB tables credit_user and credit_team.
This info is displayed in the web site, on user and team pages,
using project-supplied functions to generate the HTML.

Note: update_stats doesn't decay the recent-average values
for per-app credit; I'll add this if needed.
2014-08-15 14:01:32 -07:00
David Anderson 838259a9fd web: make server status cache period configurable; from Christian 2014-08-14 09:23:13 -07:00
David Anderson 72f1af04d2 web: make links to specific posts work even if "jump to first in thread" unset
In forum_thread.php, always call jumpToThread() on page load.
The function will be defined in a way that does the right thing based on prefs.
2014-08-12 12:25:50 -07:00
David Anderson 55fcb7ddaf web: forums: enable "jump to post" if not logged in 2014-08-12 12:14:02 -07:00
David Anderson dd5c8a804c web: add "chars remaining" for friend message
friend-request messages have a 250 char limit.
Show this in the GUI.
Factor this out into a function so we can use it elsewhere if needed.
2014-08-11 15:45:13 -07:00
David Anderson 3788d0c337 web: code cleanup 2014-08-11 14:57:34 -07:00
David Anderson 9b08194c5e web: on apps page, show which apps and app versions are beta 2014-08-11 11:43:25 -07:00
David Anderson cd1a12d4f4 web: show badges in more places
Also: improve the badge admin page
Also: zebra-stripe top user and team lists
2014-08-11 09:50:06 -07:00
David Anderson 0189132695 web: handle BBcode [pre] correctly 2014-08-10 10:26:10 -07:00
David Anderson b1fabcfedd web: add optional project-specific pref for preferring non-graphical apps
Also: show beta-test preference if project has beta app versions
2014-08-07 15:43:41 -07:00
David Anderson aa8c53773b web: factor project prefs code into a separate file
I set out to make project-specific prefs use the same object framework
(PREF_BOOL, PREF_NUM etc.) as other prefs.
This turned out to be infeasible, so I settled for a code cleanup instead.

The reason it's infeasible is that the "other prefs" code
uses a SAX parser (xml_parser_create() etc.),
while the code for project-specific prefs uses the primitive
parse_element() and parse_next_element() functions in util_basic.inc.

If I'm going to change anything, I want to switch to a DOM parser
(e.g. simplexml) for both purposes.
2014-08-05 21:02:59 -07:00
David Anderson cd5a87150b web: show generated time on top CPU and GPU pages 2014-08-04 14:21:13 -07:00
David Anderson e6b7da8278 admin web: allow changing plan class of app versions 2014-07-25 12:11:23 -07:00
David Anderson b9f0fe0298 admin web: add "assigned jobs" link 2014-07-24 23:42:45 -07:00
David Anderson 3156ea56fd delete spammers script: fix --id_range command 2014-07-23 09:51:02 -07:00
David Anderson 9a9041cf7d server: fix support for client break; show it on web 2014-07-16 21:08:18 -07:00
David Anderson 9904d7b920 web: use symbols instead of numbers in result.inc 2014-07-16 19:29:30 -07:00
Rytis Slatkevičius 1124a108bf Fix workunit/result templates in job submission rpc handler 2014-07-16 17:54:12 +03:00
Rytis Slatkevičius ac1b78b1fe Fix typos 2014-07-15 12:21:17 +03:00
Rytis Slatkevičius bff75f6f00 Remote job submission: accept wu_template parameter for create_work. 2014-07-15 11:47:18 +03:00
David Anderson 7d983da395 web: simplify and remove infinite-loop bug in web cache purging 2014-07-14 11:26:32 -07:00
David Anderson 282161831d web: add WYSIWYG control for strike-through text 2014-07-13 15:27:25 -07:00
David Anderson eb9302c8d5 Web: add support for strikethrough ([s]...[/s]) in bbcode
Didn't add to WYWIWYG interface yet
2014-07-13 10:35:22 -07:00
David Anderson 9df6e43863 web: handle the case of missing user records in a few places
The delete-spammers script was creating dangling user references
(although this is now fixed).
Detect these dangling references and clean them up.
2014-07-12 14:32:59 -07:00
David Anderson cb1bb4069a web: be more thorough when deleting users
When deleting a spammer, delete
- forum_logging
- private messages
- notifications

Also, when displaying private messages, check if sender
doesn't exist, and delete if so
2014-07-11 15:20:01 -07:00
David Anderson e437d09824 web: show peak device FLOPS on result page 2014-07-06 19:59:08 -07:00
David Anderson 02325341c8 update BOINC Web translation template 2014-07-04 09:44:53 -07:00
David Anderson 4ed83d0c6d web: in user-visible app version list, don't show beta apps as latest 2014-07-02 20:23:32 -07:00
David Anderson 73d580c4cd web: fix bug that prevented Recaptcha display 2014-07-01 20:11:06 -07:00
Oliver Bock 88e840fc95 Normalized line breaks according to latest updates of .gitattributes
* As discussed with Rom
* See also: d81607b, e93af6a, 26ca219, 8dad345
2014-06-27 10:12:11 +02:00
David Anderson debe2036d5 locale: Update compiled localization files 2014-06-25 09:53:00 -07:00
David Anderson 41a2b2c658 admin web: fix warning 2014-06-24 09:09:36 -07:00
David Anderson a243e19bdc web: replace lookup_* functions with their DB API equivalents
also:
- fix bug in db_cleanse.php
- replace some uses of deprecated mysql_* API
2014-06-23 18:29:20 -07:00
David Anderson b4dba535c0 web: fix typo 2014-06-21 13:40:02 -07:00
David Anderson eebfca71d3 delete_spammers script: log start/end times 2014-06-21 09:32:41 -07:00
David Anderson 3557365a91 web: UOTD_THRESHOLD can be specified in project.inc 2014-06-19 17:14:56 -07:00
David Anderson 29f2cf2cb9 web: add error-checking in DB interface layer 2014-06-19 15:22:52 -07:00
David Anderson b415b466c6 web: tweak 2014-06-19 00:06:43 -07:00
David Anderson 04064da270 web: in prefs form, say "0 means no limit" where appropriate
Also refactor some string translations
2014-06-19 00:00:02 -07:00
David Anderson 8ffef379b8 update_forum_activities: handle team forum posts properly 2014-06-18 16:39:12 -07:00
David Anderson 6553333002 web: check UOTD email addr 2014-06-17 22:20:26 -07:00
David Anderson aca1aead5f server: shuffle code so that the file upload handler doesn't need MySQL
Also (client): remove notices about app_config.xml after problem is fixed
2014-06-17 18:07:45 -07:00
Rytis Slatkevičius 5beaf183b5 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2014-06-17 15:55:18 +03:00
Rytis Slatkevičius 07b9de404b Optionally specify result template file name when submitting a job via RPC 2014-06-17 15:53:41 +03:00
David Anderson 9fbe00a2ff delete_spammers script: tweaks 2014-06-16 16:52:58 -07:00
David Anderson d5b27c85d3 web: fix user search function 2014-06-16 11:21:50 -07:00
David Anderson 0337ce17c9 web: use "../.." to find the project dir.
Having a project symlink its html/ to a different dir doesn't work,
because if you cd into html/ops to run a script,
there's no way to know where the project dir is, so you can't find config.xml
2014-06-13 10:09:04 -07:00
David Anderson 4208b640d6 server: fix bug that prevented PHP scripts from working 2014-06-12 18:38:38 -07:00
David Anderson bc6cf03a89 Merge remote branch 'origin/respect-symlinks' 2014-06-12 12:16:53 -07:00
David Anderson 73d6012003 web: fix DISABLE_BADGES warning 2014-06-12 09:50:31 -07:00
Oliver Bock 395279cbe1 Respect symlinks when referring to project directory
* The previous implementation doesn't work if the /html directory is a symlink
* The new implementation supports symlinks while not adding any additional
  assumptions regarding relative file locations

Background:

BOINC's codebase consists of regular source code for compilation as well as
source code for direct deployment, such as the /html folder. Projects might
choose to use a checkout of the BOINC repository and a symlink in their deployed
project root directory targeting the /html directory to facilitate html-related
patch tracking and deployment (in situ). This requires the "html" symlink not to be
resolved during lookups of the project root directory (e.g. to access config.xml).
2014-06-12 15:42:52 +02:00
David Anderson b7478c09c3 delete_spammers: fix comments 2014-06-10 14:03:12 -07:00
David Anderson 3776548971 web: allow badge disable 2014-06-10 01:24:37 -07:00
David Anderson 780284b9fa delete_spammers tweak 2014-06-10 00:45:45 -07:00
David Anderson d6962a70f0 delete_spammers.php script: add feature for delete forum spammers 2014-06-10 00:39:58 -07:00
David Anderson bccf92a807 web: fix friends-and-family email function using PHPMailer 2014-06-06 22:59:18 -07:00
David Anderson 4616d1d0c3 mass email scripts: check for PHP_MAILER properly 2014-06-06 15:57:52 -07:00
David Anderson f02c349800 server: add "beta" flag to app versions
Add beta flag to app version table.
If set, send that app version only to users whose prefs allow beta work.
2014-06-05 09:51:01 -07:00
David Anderson d337f91563 admin web: link to app version details from app version mgt page 2014-06-03 14:00:14 -07:00
Bernd Machenschalk 09d0c7cbbd html:
fix 'make install' for out-of-tree build
2014-06-03 09:25:20 +02:00
David Anderson f7472149bd web: don't use deprecated @eis code in preg_replace
This was used for fancy logic involving nested bbcode tags,
which I don't think we need
2014-06-02 19:33:17 -07:00
David Anderson cb376a0014 web: don't need db_init() in show_user.php 2014-06-01 10:14:45 -07:00
David Anderson 68ba20c9d6 admin web: tweak 2014-06-01 10:14:13 -07:00
Rytis Slatkevičius 6b00c99a21 Sort filenames in the user file sandbox 2014-05-30 14:53:59 +03:00
David Anderson 02003bc2da Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2014-05-24 09:33:02 -07:00
David Anderson 63e13d3d81 web: shrink image files, from Janus 2014-05-24 09:32:40 -07:00
David Anderson 57d4517119 web: fix typo that messed up News RSS feed 2014-05-23 15:09:50 -07:00
David Anderson 370180763f Add warning to README in BitTorrent code, saying it doesn't work 2014-05-20 13:45:08 -07:00
David Anderson b3a36cd8ca admin: add --delete_banished option to delete_spammers.php 2014-05-20 10:41:44 -07:00
David Anderson 9e580f32f8 Web RPC: fix typo that broke XML version of team email list export 2014-05-12 10:20:45 -07:00
David Anderson 9ba2f03669 admin tools: change delete_spammers.php to delete message board posts too
Also add --id_range N M command (delete range of users)
Also forum moderation "done" pages now contain link back to forum or thread
2014-05-11 00:36:45 -07:00
David Anderson cf5a7d3770 admin web: fix bug in login function 2014-05-08 16:37:22 -07:00
David Anderson ac476a23b5 Web: send News notices containing images/video only to 7.3+ clients 2014-05-08 00:50:22 -07:00
David Anderson 4a52c8708d CPU list: fix Totals row 2014-05-06 13:13:24 -07:00
David Anderson 640d6dc16a web: show elapsed and CPU time has X hrs Y min Z sec on result page.
Not sure if we should adopt this everywhere
2014-05-06 00:58:18 -07:00
David Anderson 9ad491be30 CPU list: text tweak 2014-05-06 00:38:46 -07:00
David Anderson 84946df1f5 CPU list: typo 2014-05-06 00:32:06 -07:00
David Anderson d74d89c8e2 CPU list: show FLOPS per core as well as per host 2014-05-06 00:27:50 -07:00
David Anderson 604661bbff web: link to CPU list from stats page 2014-05-05 23:22:41 -07:00
David Anderson 4cc7b2d04e web: fixes to CPU list 2014-05-05 22:39:14 -07:00
David Anderson bd77c5c52c web: add CPU list page 2014-05-05 22:33:07 -07:00
David Anderson 31fa76e7c9 web: express app version computing in GFLOPS, not credit 2014-05-05 01:13:47 -07:00
David Anderson 1d8a042465 web: show credit in app version list 2014-05-05 01:01:44 -07:00
David Anderson e5810f3061 client/server: change implementation of "exact fraction done".
My last commit did this using a new API call.
But this would require rebuilding apps any time you want to change it;
too much work.
So instead make it an attribute of apps,
which you can set via the admin web interface.

Corresponding changes to client.
2014-05-04 00:02:32 -07:00
Rytis Slatkevičius 6179a2493b Enable assigned work for remote job submission (RPC only) 2014-05-02 09:57:02 +03:00
David Anderson be58781a2f Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2014-04-30 15:39:25 -07:00
David Anderson 8390e60343 comment tweak 2014-04-30 15:39:10 -07:00
David Anderson 5d0b06136a web: update interface to PHPMailer
Depending on your mail server, PHPMailer can take various config options.
Instead of passings these as variables from project.inc to email.inc,
have project project.inc define a function make_php_mailer()
that creates a PHPMailer object, configures it as needed, and returns it.

For projects that use PHPMailer, this will require modifying your project.inc.
2014-04-30 10:36:04 -07:00
David Anderson b6972f3b82 locale: Update compiled localization files 2014-04-29 11:10:55 -07:00
David Anderson b481f14213 web: fix language name 2014-04-29 10:06:38 -07:00
David Anderson f67833b28f Add Malay to language list 2014-04-29 09:52:27 -07:00
Rytis Slatkevičius e9d5a08eda Load job input file information from the database instead of checking download dir (fixes remote files). 2014-04-29 10:43:39 +03:00
Rytis Slatkevičius 5b62645853 Add missing directory separator to the last commit 2014-04-29 10:23:13 +03:00
Rytis Slatkevičius b4e8cc6b03 Read sandbox directory from the config file and also allow project.inc override for it. 2014-04-29 10:08:33 +03:00
Rytis Slatkevičius 166d9f46c0 If sandbox link file does not exist, return an error 2014-04-25 15:22:46 +03:00
Rytis Slatkevicius e5bdb008df Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2014-04-25 11:17:47 +03:00
Rytis Slatkevicius a67819e42a Split select name from file filter regexp in sandbox_file_select; optionally allow selection of an empty value. 2014-04-25 11:16:06 +03:00
David Anderson 3b4a604498 web: tweaks to last commit 2014-04-24 09:54:13 -07:00
David Anderson 278f3fd370 web: use new DB API here and there; should be no visible changes 2014-04-24 09:41:59 -07:00
David Anderson e5dc4bb3f1 Server: add some functions to PHP DB interface for platforms
- I'd like to transition from Python (and the clunky
  DB interface we developed) to PHP for tools like xadd
- I'd like to figure out how to change the PHP DB interface
  so that we can define generic functions like insert(), update() etc.
  just one, in a base class.
2014-04-22 10:03:16 -07:00
David Anderson 944e5a3b29 job submission: generate physical name for remote input files
Don't require job submitters to come up with (unique) names
for remote input files.  Just use "jf_MD5".
2014-04-21 13:19:10 -07:00
David Anderson 6c3a5792e2 admin web: display badge images correctly in badge admin page 2014-04-21 13:18:25 -07:00
David Anderson 8dd86be33b PHP interface to remote job submission: support remote input files 2014-04-21 11:34:10 -07:00
David Anderson ac27ea56c2 remote job submission: support remote input files
Allow jobs submitted remotely to have input files that are remote,
i.e. hosted on other servers. See
http://boinc.berkeley.edu/trac/wiki/RemoteJobs#create_batch
2014-04-21 11:21:49 -07:00
David Anderson b84bd5f704 remote job submission: tweak 2014-04-20 20:19:55 -07:00
David Anderson 2f5c452b33 admin web: fix bug when marking app non-CPU-intensize 2014-04-20 00:29:32 -07:00
David Anderson 89d92f4a24 admin web: show PHP warnings 2014-04-20 00:29:05 -07:00
David Anderson 6656e2eaec fix PHP warning in job submission interface 2014-04-20 00:28:07 -07:00
David Anderson af99251e79 web: let projects disable forums
Do this by putting
define("DISABLE_FORUMS", true);
in your html/project/project.inc.

If this is set, admin users can still see enough forum functionality
to post and edit news items
(this is linked to from the Admin web interface).

Other users, or non-logged-in access, sees news but no forums
or forum-related info.
2014-04-18 15:54:28 -07:00
David Anderson 4d7c0113f5 web: tweaks for "no teams" feature 2014-04-18 00:15:05 -07:00
David Anderson 1010cee2ae web: 2014-04-17 23:31:51 -07:00
David Anderson 6706f5c893 admin: add "delete_spammers.php": script to help delete spam profiles 2014-04-17 12:41:04 -07:00
David Anderson 7c9b5a6b56 web: lets project admins delete posts and threads
Spam needs to be deleted, not hidden.
Add buttons for deleting posts and threads.
For now, these are available only to admins
(ADMIN, DEV, SCIENTIST privileges).
2014-04-16 22:54:17 -07:00
David Anderson 28b36a331a admin web: don't show deprecated claimed credit 2014-04-16 22:00:47 -07:00
Rytis Slatkevičius 8df684206b Extend user's sandbox to allow uploading multiple files at once (note: supported browsers are Firefox 3.6+, Safari 5+, Chrome 6+, Opera 11+, IE 10+; for older browsers only one file will be allowed like before). 2014-04-15 12:54:11 +03:00
David Anderson 65ec42da6c remote job submission: fix bug 2014-04-14 12:33:43 -07:00
David Anderson 39edd6d3f8 remote job submission: improve error reporting 2014-04-12 10:05:59 -07:00
David Anderson ec8200d0eb Web: in PHP < 5.3.0, mysqli doesn't support persistent connections 2014-04-11 11:02:12 -07:00
Rytis Slatkevičius 69f0696829 Remove one more hardcoded download location; do not read read config file in a loop 2014-04-11 14:20:04 +03:00
Rytis Slatkevičius d56b399f55 Fix several undefined functions and parameters in remote job submission example 2014-04-11 14:00:50 +03:00
Rytis Slatkevičius 1b5d17944c Read download file location for remote job submission RPC (was hardcoded). 2014-04-11 12:39:51 +03:00
David Anderson 641b2da0b3 admin web: fix bug that could cause badges to not get deleted properly. 2014-04-10 09:16:10 -07:00
David Anderson 99a21e3443 remote job submission: create batches more efficiently
Change the "submit_batch" RPC handler to use the new feature of create_work
that lets you create multiple jobs in one command.
2014-04-07 10:14:32 -07:00
David Anderson 936556b4ac Admin web: don't use project banner; use stylesheets
It doesn't make sense to show the project banner in admin pages;
the banner typically has (broken) links to non-admin pages.

Also, include basic stylesheets in admin pages.
2014-04-03 12:14:37 -07:00
David Anderson fc7c75b200 server: parse peak memory/disk info from client, store in DB, display in web
The latest client reports the peak working set size, swap size,
and disk usage for completed jobs.
Add fields to the results table to store these.
Parse them in scheduler request messages, and write to the DB.
Display them in the result web page.

This data can be used to improve (or even automate)
the job estimates for memory and disk usage.
2014-04-02 19:35:59 -07:00
David Anderson f5fea9c3d3 team_import script: decode entities properly 2014-03-28 14:52:37 -07:00
David Anderson 70c458aa44 BOINC web site: fix PHP warnings; change VBox link on download page 2014-03-24 15:13:06 -07:00
David Anderson ffda962698 web: get rid of If-Modified-Since stuff in cache.inc.
We can't use this since cache functions are called in the middle of page generation
2014-03-22 10:30:36 -07:00
David Anderson 6216673eca web: fix missing mysqli change 2014-03-22 09:04:58 -07:00
David Anderson 42a386e89f Bossa: use new DB interface; from Janus 2014-03-21 10:40:12 -07:00
David Anderson 8e59a5b2ae web: if present, use the mysqli interface to MySQL.
The older interface is deprecated and may eventually be removed.
Note: some of the more ancient PHP code directly uses the old interface.
We'll have to update this at some point.
2014-03-21 01:08:47 -07:00
David Anderson 3aa4e32ed2 web RPCs: fix typo. From Jaime 2014-03-20 13:09:38 -07:00
David Anderson 0355298b0d client: read stderr file if abort non-running job 2014-03-20 01:28:39 -07:00
David Anderson e9ecc2cf67 web: fix bug when reply to forum post while not logged in
Need to use urlencode() when redirecting
2014-03-17 11:33:49 -07:00
David Anderson 8e5d9c1f12 web: message tweak 2014-03-16 14:47:50 -07:00
David Anderson 92f35f9f7b web: when export posts as RSS feed, escape HTML for non-admin posters 2014-03-15 15:33:38 -07:00
David Anderson 2869cf4bbd web: fix typo 2014-03-14 12:03:12 -07:00
David Anderson fbc81b40ae web: only show HTML in posts by admins (fix yesterday's changes) 2014-03-14 00:20:07 -07:00
David Anderson ff484b9228 web: allow HTML in news items
Now that the manager supports images/video in notices,
we need to allow these in new posts
(i.e. posts to the News forum, which only admins can do).
Don't escape HTML tags in the web display of news items,
or in their export in RSS
2014-03-13 13:08:27 -07:00
David Anderson 0cdee0af4e Fixes for the BOINC-wide teams site
- the exported team list wasn't parsing due to non-ASCII characters
    in some team descriptions.
    htmlspecialchars() wasn't doing the job.
    Use DOMDocument instead.
- If SHOW_NONVALIDATE_TEAMS is set (as on the BOINC-wide teams site)
    show teams whose founders email addresses are not validated
    (and hence won't be exported).
2014-03-07 00:37:44 -08:00
David Anderson 5381def663 server: use gpu_active_frac in scheduling decisions
On some hosts, gpu_active_frac may be much less than active_frac
(i.e., GPUs may be available much less than CPUs).
Use gpu_active_frac in the following places:

- scheduler: in estimating the elapsed time of jobs,
    to decide whether they can meet deadline
- scheduler: in computing the effective speed of a (host, app version),
    when deciding what size class it belongs to
- size_census: in computing effective speed of (host, app versions)

(Previously, we were just using active_frac in all these cases)
2014-03-06 21:23:02 -08:00
David Anderson df1d8e2bde server: store and display gpu_active_frac
- gpu_active_frac is the fraction of time GPU use is allowed
  while the client is running.
  Previously the client reported it but we weren't storing it in the DB.
  We may need it in the future for batch scheduling logic.
- fix a crashing bug in scheduler
- client: minor message tweak
2014-03-06 13:23:52 -08:00
David Anderson bb9d53336e server: add app_select_edit.php script
Use this if your project allows user app selection,
and you add a new app.
It makes the new app selected for all users.
2014-03-04 11:14:15 -08:00
David Anderson 6f6168896b admin web: code cleanup in manage_user.php (ancient, undergrad-written) 2014-03-03 00:44:18 -08:00
David Anderson 20c11bccf7 fixes for Android/x86 build scripts, from Jon 2014-03-02 22:47:24 -08:00
David Anderson 28ff9223ab Server: add feature to mass email script to send to ID list 2014-03-01 12:07:46 -08:00
David Anderson 603bca7b0b admin web: fix small bugs in manage_user.php 2014-02-21 12:05:39 -08:00
David Anderson 503b481548 web: order results by descending sent_time when showing ID 2014-02-20 12:56:27 -08:00
David Anderson 7787e48172 server: add intel_gpu case to gpu_ratios.php 2014-02-20 11:08:24 -08:00
David Anderson 054d70b4ee Job-size matching: fix bug in size_census.php, and add an --all_apps option. From Jon Sonntag 2014-02-20 09:43:46 -08:00
David Anderson 6610f7633b web: show Intel GPUs in top GPU list 2014-02-19 22:52:33 -08:00
David Anderson 6ff59eae06 web: remove "mobile" from host venue select 2014-02-08 15:38:11 -08:00
David Anderson 9220ceb02a Admin web: deprecate problem_host.php, which sends a confusing email to user 2014-02-05 17:21:03 -08:00
David Anderson 43eb73fa50 locale: Update compiled localization files 2014-02-03 00:14:28 -08:00
David Anderson 7e00868161 get_project_config: don't show platforms for deprecated apps 2014-02-02 22:08:09 -08:00
David Anderson 5f9cd8c5d5 locale: Update compiled localization files 2014-02-01 12:16:24 -08:00
David Anderson c4f4421ff0 client/manager/server: use HTTPS for web RPCs if possible
The web RPCs done by the client during project attach
(lookup_account, create_account)
have an email address and password hash in their request.
Network sniffers could potentially see these,
so we should use HTTPS for these RPCs if possible.
However, not all BOINC projects have SSL-enabled web servers.
So I did the following:

- Change get_project_config.php to return an additional
  <web_rpc_url_base> element.
  This is SECURE_URL_BASE (if specified in the project's
  project.inc config file) or, if not, the master URL.
- This new element is parsed into the PROJECT_CONFIG structure.
- In calls to create_account and lookup_account,
  the Manager uses PROJECT_CONFIG::web_rpc_url_base
  if it's available, else the master URL.

So, the new Manager/client uses HTTPS for RPCs to projects
that have updated their get_project_config.php,
and specify a SECURE_URL_BASE with https:// prefix.

Android note: I added code to parse the new config element,
but didn't change the higher-level code;
Joachim will need to do this.
2014-01-28 13:25:59 -08:00
David Anderson 4a9f9fa506 locale: Update compiled localization files 2014-01-19 12:17:28 -08:00
David Anderson 5736d2c800 locale: Update compiled localization files 2014-01-18 00:16:58 -08:00
David Anderson 2f6ed0a281 locale: Update compiled localization files 2014-01-17 12:06:50 -08:00
David Anderson 01b78c714a Remote job submission: allow efficient batch query
The batch query call used by Condor (query_batch_set(), in the C++ API)
returned info about all the jobs in the set of batches,
even those that hadn't changed.
This is potentially inefficient - a query might return info
about 10,000 jobs, only a few (or none) of which have changed state
since the last call.

Solution: add a "min_mod_time" parameter to the call.
Only jobs that have changed state since that time are reported.
Also, add a "server_time" field to the return,
giving the current time on the server
(in case there's clock skew between client and server)

Also, fix some text scrambling introduced in previous checkin;
there must have been a gremlin in my vim.
2014-01-16 10:24:10 -08:00
David Anderson fe1db8060a Remote job submission: allow a limit on the # of in-progress jobs per user 2014-01-13 21:52:55 -08:00
David Anderson 2163db930a locale: Update compiled localization files 2014-01-11 12:16:19 -08:00
David Anderson ed750422ee web: tweak 2014-01-11 11:03:35 -08:00
David Anderson 52cbfd260e locale: Update compiled localization files 2014-01-11 00:15:10 -08:00
David Anderson a50be68095 locale: Update compiled localization files 2014-01-10 12:18:26 -08:00
David Anderson e979588b7f web: cleanup and minor bug fixes, from Janus 2014-01-09 13:51:12 -08:00
David Anderson 20ff585a94 client: job scheduler tweaks to avoid idle CPUs
- allow overcommitment by > 1 CPU.
  E.g. If there are two 6-CPU jobs on an 8 CPU machine, run them both.
- Prefer MT jobs to ST jobs in general.
  When reorder the run list (i.e. converting "preliminary" to "final" list),
  prefer job J1 to J2 if:
  1) J1 is EDF and J2 isn't
  2) J1 uses GPUs and J2 doesn't
  3) J1 is in the middle of a timeslice and J2 isn't
  4) J1 uses more CPUs than J2
  5) J1's project has higher scheduling priority than J2's
  ... in that order.

  4) is new; it replaces the function promote_multi_thread_jobs(),
  which did something similar but didn't work in some cases.
2014-01-09 12:07:55 -08:00
David Anderson 307b4538d6 get_project_config.php: use DB abstraction layer. From Janus. 2014-01-08 17:17:07 -08:00
David Anderson e579a0ad56 web: change server status page to use DB interface; from Janus 2014-01-07 13:13:44 -08:00
David Anderson e672cdac37 web: don't call db_init() in uotd.inc 2014-01-07 13:04:59 -08:00
David Anderson b12b85cfdb Admin web: convert create_forums.php to use DB abstraction layer (from Janus) 2014-01-06 14:20:25 -08:00
David Anderson d475de82dc locale: Update compiled localization files 2013-12-29 00:18:36 -08:00
David Anderson e8110e6918 Fix last commit 2013-12-28 22:53:47 -08:00
David Anderson ecdc25968a Extend PHP interface for Web RPCs
- add a PHP interface for lookup_account()
- PHP interfaces return error number as well as message
  (messages change; numbers don't)
- using symbolic error codes instead of hardwired numbers in PHP code
2013-12-28 22:50:59 -08:00
David Anderson ef245d456b web: show badges on private user page 2013-12-23 22:13:27 -08:00