Skip to content

Commit

Permalink
web: fix PHP warning in login action.
Browse files Browse the repository at this point in the history
Apparently urldecode(null) gets a warning in current PHP
  • Loading branch information
davidpanderson committed Dec 4, 2023
1 parent b978d5c commit 7aeb4e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions html/user/login_action.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ function login_with_ldap($uid, $passwd, $next_url, $perm) {
}

$next_url = post_str("next_url", true);
$next_url = urldecode($next_url);
$next_url = sanitize_local_url($next_url);
if (strlen($next_url) == 0) {
if ($next_url) {
$next_url = urldecode($next_url);
$next_url = sanitize_local_url($next_url);
}
if (!$next_url) {
$next_url = USER_HOME;
}

Expand Down
3 changes: 3 additions & 0 deletions sched/file_upload_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ int handle_file_upload(FILE* in, R_RSA_PUBLIC_KEY& key) {
strcpy(name, "");
strcpy(xml_signature, "");
bool found_data = false;

// TODO: use XML parser

while (boinc::fgets(buf, 256, in)) {
log_messages.printf(MSG_DETAIL, "got:%s\n", buf);
if (match_tag(buf, "<file_info>")) continue;
Expand Down

0 comments on commit 7aeb4e7

Please sign in to comment.