Review : ss.wargaid.my.id


horasjey

Poster 2.0
Hi o-oom dan rekan DWH yang sedang ngopi + duduk + rokok. :103:

jd gini, saya ada jumpa di beberapa grup / forum ada yng tidak bisa melakukan upload image ( only iframe url , e.g lowendtalk ) , dan ada juga di beberapa kasus open ticket juga tidak bisa copy paste gambar ke kolom text, mesti upload img( malas rasanya kalo upload, karena ribet mesti save file dulu ke local PC baru upload)

walaupun sebenarnya website yang saya sedang buat ini sudah banyak yang baut e.g prnt.sc

tapi saya pengen buat agak nakal sikit :30:

secara sederhana saya sudah berhasil membuat website seperti prnt.sc , dengan flowchart
copy image / screanshoot >>> paste ke index.html >> upload local file ke STB ( di sini aku makai STB buat server home ) >> upload file ke github >> proxsy url gambar dari github menggunakan cdn CF dengan header respound webp >> hapus file di local STB,


nah , di sini saya jg mau bertanya sedikit kepada senior bug hunter dengan code backend php saya ini sudha termasuk aman atau tidak yah ..?( Takut nya ada celah buat upload script backdorr :20::109:)
PHP:
 $check = getimagesize($_FILES["image"]["tmp_name"]);
    if ($check !== false) {
        
            $image = imagecreatefromstring(file_get_contents($_FILES["image"]["tmp_name"]));
            if ($image !== false) {
                $outputFile = $targetDirectory . pathinfo($targetFile, PATHINFO_FILENAME) . ".png";
                if (imagewebp($image, $outputFile)) {
                    // my code for proses upload img to github
                } else {
                    echo "Failed to convert and upload the image.";
                }
                imagedestroy($image);
            } else {
                echo "Invalid image format.";
            }
        } else {
        echo "File is not an image.";
    }

sama satu lagi, kira-kira saya melanggar tos github gk ya buat simpan gambar gambar sampah screanshoot ke repository github saya?

udah itu ajah sih,

terima kasih

NB : maaf kalo UI/UX sangat sederhana, karena lagi malas berfikir :20:
 

trias

Hosting Guru
Hi o-oom dan rekan DWH yang sedang ngopi + duduk + rokok. :103:

jd gini, saya ada jumpa di beberapa grup / forum ada yng tidak bisa melakukan upload image ( only iframe url , e.g lowendtalk ) , dan ada juga di beberapa kasus open ticket juga tidak bisa copy paste gambar ke kolom text, mesti upload img( malas rasanya kalo upload, karena ribet mesti save file dulu ke local PC baru upload)

walaupun sebenarnya website yang saya sedang buat ini sudah banyak yang baut e.g prnt.sc

tapi saya pengen buat agak nakal sikit :30:

secara sederhana saya sudah berhasil membuat website seperti prnt.sc , dengan flowchart
copy image / screanshoot >>> paste ke index.html >> upload local file ke STB ( di sini aku makai STB buat server home ) >> upload file ke github >> proxsy url gambar dari github menggunakan cdn CF dengan header respound webp >> hapus file di local STB,


nah , di sini saya jg mau bertanya sedikit kepada senior bug hunter dengan code backend php saya ini sudha termasuk aman atau tidak yah ..?( Takut nya ada celah buat upload script backdorr :20::109:)
PHP:
 $check = getimagesize($_FILES["image"]["tmp_name"]);
    if ($check !== false) {
       
            $image = imagecreatefromstring(file_get_contents($_FILES["image"]["tmp_name"]));
            if ($image !== false) {
                $outputFile = $targetDirectory . pathinfo($targetFile, PATHINFO_FILENAME) . ".png";
                if (imagewebp($image, $outputFile)) {
                    // my code for proses upload img to github
                } else {
                    echo "Failed to convert and upload the image.";
                }
                imagedestroy($image);
            } else {
                echo "Invalid image format.";
            }
        } else {
        echo "File is not an image.";
    }

sama satu lagi, kira-kira saya melanggar tos github gk ya buat simpan gambar gambar sampah screanshoot ke repository github saya?

udah itu ajah sih,

terima kasih

NB : maaf kalo UI/UX sangat sederhana, karena lagi malas berfikir :20:
keren pak
 

Top