Merge remote-tracking branch 'origin/master' into inicert

This commit is contained in:
projectSylas
2021-10-01 02:37:43 +00:00
23 changed files with 104 additions and 33 deletions

View File

@ -77,7 +77,7 @@ run_event('cheditor_photo_upload', $data_dir, $data_url);
//
$tempfile = $_FILES['file']['tmp_name'];
$filename = $_FILES['file']['name'];
$filename_len = strrpos($filename, ".");
$type = substr($filename, strrpos($filename, ".")+1);
$found = false;
switch ($type) {
@ -89,7 +89,7 @@ switch ($type) {
$found = true;
}
if ($found != true) {
if ($found != true || $filename_len != 23) {
exit;
}

View File

@ -13,8 +13,8 @@ $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
$request_token = $connection->getRequestToken(OAUTH_CALLBACK);
/* Save temporary credentials to session. */
$_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
$_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];
$_SESSION['oauth_token'] = $token = @$request_token['oauth_token'];
$_SESSION['oauth_token_secret'] = @$request_token['oauth_token_secret'];
//print_r2($_SESSION); exit;

View File

@ -77,7 +77,7 @@ class TwitterOAuth {
$parameters['oauth_callback'] = $oauth_callback;
$request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
$token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
$this->token = new OAuthConsumer(@$token['oauth_token'], @$token['oauth_token_secret']);
return $token;
}