mirror of
https://github.com/friendica/friendica
synced 2025-04-25 23:10:12 +00:00
Burn notices, burn
This commit is contained in:
parent
aa2ab3d0e7
commit
8b96a53fba
6 changed files with 36 additions and 30 deletions
|
@ -30,6 +30,10 @@ function bookmarklet_content(App $a)
|
|||
$page = normalise_link(System::baseUrl() . "/bookmarklet");
|
||||
|
||||
if (!strstr($referer, $page)) {
|
||||
if (empty($_REQUEST["url"])) {
|
||||
System::httpExit(400, ["title" => L10n::t('Bad Request')]);
|
||||
}
|
||||
|
||||
$content = add_page_info($_REQUEST["url"]);
|
||||
|
||||
$x = [
|
||||
|
|
|
@ -212,7 +212,7 @@ function photos_post(App $a)
|
|||
}
|
||||
|
||||
// Check if the user has responded to a delete confirmation query
|
||||
if ($_REQUEST['canceled']) {
|
||||
if (!empty($_REQUEST['canceled'])) {
|
||||
goaway($_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
|
@ -762,12 +762,14 @@ function photos_post(App $a)
|
|||
$filesize = $ret['filesize'];
|
||||
$type = $ret['type'];
|
||||
$error = UPLOAD_ERR_OK;
|
||||
} else {
|
||||
} elseif (!empty($_FILES['userfile'])) {
|
||||
$src = $_FILES['userfile']['tmp_name'];
|
||||
$filename = basename($_FILES['userfile']['name']);
|
||||
$filesize = intval($_FILES['userfile']['size']);
|
||||
$type = $_FILES['userfile']['type'];
|
||||
$error = $_FILES['userfile']['error'];
|
||||
} else {
|
||||
$error = UPLOAD_ERR_NO_FILE;
|
||||
}
|
||||
|
||||
if ($error !== UPLOAD_ERR_OK) {
|
||||
|
|
|
@ -41,14 +41,14 @@ function salmon_post(App $a, $xml = '') {
|
|||
$base = null;
|
||||
|
||||
// figure out where in the DOM tree our data is hiding
|
||||
if($dom->provenance->data)
|
||||
if (!empty($dom->provenance->data))
|
||||
$base = $dom->provenance;
|
||||
elseif($dom->env->data)
|
||||
elseif (!empty($dom->env->data))
|
||||
$base = $dom->env;
|
||||
elseif($dom->data)
|
||||
elseif (!empty($dom->data))
|
||||
$base = $dom;
|
||||
|
||||
if(! $base) {
|
||||
if (empty($base)) {
|
||||
logger('unable to locate salmon data in xml ');
|
||||
System::httpExit(400);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ function webfinger_content(App $a)
|
|||
$o = '<h3>Webfinger Diagnostic</h3>';
|
||||
|
||||
$o .= '<form action="webfinger" method="get">';
|
||||
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
|
||||
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . defaults($_GET, 'addr', '') .'" />';
|
||||
$o .= '<input type="submit" name="submit" value="Submit" /></form>';
|
||||
|
||||
$o .= '<br /><br />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue