This topic has 14 replies, 3 voices, and was last updated 10 years ago by Anonymous.
Viewing 15 posts - 1 through 15 (of 15 total)
Hi,
1. the prepared statements are not working correctly. If you upload a php file instead a photo, then you are able to hijack the server. Please rework the prepared statements for the upload function and check if the file is a jpg, png or a gif-file. If the file is not a image file, then stop uploading the file.
2. I localized the advanced testimonials manager into german language, but all special characters where not shown correctly, e.g. f�r instead of für, Vollst�ndige instead of Vollständige and so on. Could you please provide a solution?
Thanks in advanced!
Best regards
Norman from pddv
P.S.: I am able to upload a php file, e.g. a php file with phpinfo();
Therefore I could do a lot of other things…
http://www.bannersmonster.com/scripts/advtestm/upload/141113teste.php
For the upload function: We’ll consider adding a condition for the images to upload in the next future updates.
For German Language:
Add this line in header.php on line no#6
Sorry,
Kindly replace this line <html xmlns="http://www.w3.org/1999/xhtml"> in header.php line#6
with,
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> // for german language
Hi Pam Reddy,
thank you for the code. I added it into all header.php (testimonial/header.php and admin/header.php).
Now it is working for some areas, but not at all.
I have attached a screenshot to get a better understanding.
Could you please give me a hint, where I have to modify the code again to remove the latest german unicode bugs?
Thank you very much in advance.
Best regards,
PDDV
Hi Fem,
i don’t think that I changed the fonts.
Yes, of course:
https://www.deutsch-vietnamesisch-dolmetscher.com/testimonials/index.php
BR,
Norman
I see you have a font Droid Serif in the header and Lato in the css kindly change those and choose a fonts with your prefered lang chars from google font and add in header file. You need to select the latin or extended latin from the specimen
https://fonts.google.com/specimen/Lato?authuser=1&query=lato
Use
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&subset=latin-ext" rel="stylesheet">
Try using the text editor and see. Are you using FTP editor for editing the characters or text? Coz everything is perfect i see few texts are not translated. If it was an issue with something the the utf8 or encoding then it should fall to all.
I localized the text with poEdit. I edit all my pages local with notepadd++ in utf-8 without BOM and then upload it to the ftp with totalcmd. I converted all files from utf-8 to utf-8 without BOM. That is normally necessary to view all pages without ugly characters. But there are still ugly characters.
Only the testimonial test entry is not translated.
Please update testimonial/addnew.php after line 6 if ( $addtestmonial ) { and testimonials/admin/addnew.php after line 14 if ( $addtestmonial ) { with the following code to avoid hacking attacks through uploading php files or other files than images. Please adapt the error messages to the correct variables. It already should work. Feel free to implement and adapt the code for the next release
if (isset($_FILES["photo"]) AND ! $_FILES["photo"]["error"] AND ($_FILES["photo"]["size"] < 300000 )) {
$bildinfo = getimagesize($_FILES["photo"]["tmp_name"]);
if ($bildinfo === false) {
die("kein Bild");
} else {
$mime = $bildinfo["mime"];
$mimetypen = array (
"image/jpeg" => "jpg",
"image/gif" => "gif",
"image/png" => "png"
);
if (!isset($mimetypen[$mime])) {
die("nicht das richtige Format");
} else {
$endung = $mimetypen[$mime];
}
$neuername = basename($_FILES["photo"]["name"]);
$neuername = preg_replace("/\.(jpe?g|gif|png)$/i", "", $neuername);
$neuername = preg_replace("/[^a-zA-Z0-9_-]/", "", $neuername);
$neuername .= ".$endung";
$ziel = "upload/$neuername";
while (file_exists($ziel)) {
$neuername = "kopie_$neuername";
$ziel = "upload/$neuername";
}
if (@move_uploaded_file($_FILES["photo"]["tmp_name"], $ziel)) {
echo "Dateiupload hat geklappt";
} else {
echo "Dateiupload hat nicht geklappt";
}
}
}
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic.