bug fix android
This commit is contained in:
1 parent
0bc3e38a79
commit
29b22ece9e
2 files changed
+24
-12
No files matched your search
+3
-3
@@ -13,10 +13,8 @@ if (strpos($sharehandle, "&fbclid")) {
|
||||
$stripFB = explode("&fbclid", $sharehandle);
|
||||
$sharehandle = $stripFB[0];
|
||||
}
|
||||
|
||||
$sharehandle = base64url_decode($sharehandle);
|
||||
$shareparts = explode("|", $sharehandle);
|
||||
|
||||
if (count($shareparts) > 1) {
|
||||
$username = $shareparts[0];
|
||||
$contentid = $shareparts[1];
|
||||
@@ -31,7 +29,9 @@ if (count($shareparts) > 1) {
|
||||
//print_r($value);
|
||||
if ($contentid == $value['guid'])
|
||||
{
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], "hpwOS") || strpos($_SERVER['HTTP_USER_AGENT'], "webOS")) {
|
||||
|
||||
$client = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
if (strpos($client, "hpwos") || strpos($client, "webos") || strpos($client, "android")) {
|
||||
echo '<img src="i.php?'. $_SERVER['QUERY_STRING'] . '">';
|
||||
} else {
|
||||
header('Content-Description: File Transfer');
|
||||
|
||||
@@ -17,8 +17,26 @@ function is_valid_base64($str){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$source = $_SERVER['QUERY_STRING'];
|
||||
//handle Facebook
|
||||
if (strpos($source, "&fbclid")) {
|
||||
$source = str_replace("%3D", "=", $source);
|
||||
$stripFB = explode("&fbclid", $source);
|
||||
$source = $stripFB[0];
|
||||
}
|
||||
|
||||
$link = "http://";
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
||||
$link = "https://";
|
||||
$link .= $_SERVER['HTTP_HOST'];
|
||||
$link .= $_SERVER['REQUEST_URI'];
|
||||
$linkParts = explode("image.php", $link);
|
||||
$link = $linkParts[0] . "download.php?" . $source;
|
||||
|
||||
?>
|
||||
<html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
|
||||
|
||||
<head>
|
||||
<title>Image Proxy</title>
|
||||
<style>
|
||||
@@ -28,17 +46,11 @@ function is_valid_base64($str){
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<meta property="og:image" content="<?php echo $link ?>" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$source = $_SERVER['QUERY_STRING'];
|
||||
|
||||
//handle Facebook
|
||||
if (strpos($source, "&fbclid")) {
|
||||
$source = str_replace("%3D", "=", $source);
|
||||
$stripFB = explode("&fbclid", $source);
|
||||
$source = $stripFB[0];
|
||||
}
|
||||
|
||||
if (is_valid_base64($source))
|
||||
$isource = $source;
|
||||
|
||||
Reference in new issue
Block a user