Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: remove vulnerabilities in tree_threader and in unused badge function #5964

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions html/inc/util_ops.inc
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ function app_version_desc($avid) {
////// badge-related stuff

function get_badge($name, $title, $image_url) {
$name = BoincDb::escape_string($name);
$title = BoincDb::escape_string($title);
$image_url = BoincDb::escape_string($image_url);
$b = BoincBadge::lookup("name='$name'");
if ($b) return $b;
$now = time();
Expand Down
4 changes: 3 additions & 1 deletion html/user/tree_threader.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

DEPRECATED

// Handler for TreeThreader remote job submission.
//
// Assumptions:
Expand Down Expand Up @@ -155,7 +157,7 @@ function handle_get_output($r, $batch) {

// authenticate the user
//
$auth = (string)$r->auth;
$auth = BoincDb::escape_string((string)$r->auth);
$user = BoincUser::lookup("authenticator='$auth'");
if (!$user) error("invalid authenticator");
$user_submit = BoincUserSubmit::lookup_userid($user->id);
Expand Down
Loading