bug fix android

This commit is contained in:
codepoet80 committed 2021-05-30 00:15:54 +00:00
1 parent 0bc3e38a79
commit 29b22ece9e
2 files changed
+24 -12

No files matched your search

+3 -3
View File
@@ -13,10 +13,8 @@ if (strpos($sharehandle, "&fbclid")) {
$stripFB = explode("&fbclid", $sharehandle); $stripFB = explode("&fbclid", $sharehandle);
$sharehandle = $stripFB[0]; $sharehandle = $stripFB[0];
} }
$sharehandle = base64url_decode($sharehandle); $sharehandle = base64url_decode($sharehandle);
$shareparts = explode("|", $sharehandle); $shareparts = explode("|", $sharehandle);
if (count($shareparts) > 1) { if (count($shareparts) > 1) {
$username = $shareparts[0]; $username = $shareparts[0];
$contentid = $shareparts[1]; $contentid = $shareparts[1];
@@ -31,7 +29,9 @@ if (count($shareparts) > 1) {
//print_r($value); //print_r($value);
if ($contentid == $value['guid']) 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'] . '">'; echo '<img src="i.php?'. $_SERVER['QUERY_STRING'] . '">';
} else { } else {
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
+21 -9
View File
@@ -17,8 +17,26 @@ function is_valid_base64($str){
return false; 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> <head>
<title>Image Proxy</title> <title>Image Proxy</title>
<style> <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="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" /> <meta http-equiv="Expires" content="0" />
<meta property="og:image" content="<?php echo $link ?>" />
</head> </head>
<body> <body>
<?php <?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)) if (is_valid_base64($source))
$isource = $source; $isource = $source;