Changeset 3285559
- Timestamp:
- 05/01/2025 12:22:09 PM (11 months ago)
- Location:
- quran-text-multilanguage/trunk
- Files:
-
- 3 edited
-
admin/quran-admin.php (modified) (2 diffs)
-
quran-text-multilanguage.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
quran-text-multilanguage/trunk/admin/quran-admin.php
r3284108 r3285559 13 13 14 14 if(!wp_verify_nonce($_POST['template_quran_noncename'], 'tplquran')){ 15 16 15 die('token non valide'); 17 18 16 } 19 17 18 // Vérification du nonce pour les options 19 if(!wp_verify_nonce($_POST['quran_options_nonce'], 'quran_options')){ 20 die('token non valide'); 21 } 20 22 21 23 foreach($_POST['option'] as $name => $val){ 22 23 24 $value = sanitize_text_field($val); 24 25 26 // Validation supplémentaire pour les champs de couleur 27 if(strpos($name, 'color') !== false || strpos($name, 'background') !== false) { 28 if(!preg_match('/^#[a-f0-9]{6}$/i', $value)) { 29 $value = '#000000'; // Valeur par défaut si invalide 30 } 31 } 32 25 33 if(empty($value)){ 26 27 34 delete_option($name); 28 29 35 }else{ 30 31 36 update_option($name, $value); 32 33 37 } 34 35 36 37 38 } 38 39 … … 108 109 109 110 <form method="post" action=""> 110 111 112 111 <?php wp_nonce_field('quran_options', 'quran_options_nonce'); ?> 113 112 <?php settings_fields( 'quran-options' ); ?> 114 113 -
quran-text-multilanguage/trunk/quran-text-multilanguage.php
r3284108 r3285559 535 535 536 536 } 537 538 function qtm_changesura() { 539 if(!isset($_GET['sura']) || !preg_match('/^[0-9]+$/', $_GET['sura'])) { 540 wp_send_json_error(esc_html__('Paramètre sourate invalide', 'quran-text-multilanguage')); 541 return; 542 } 543 544 $sura = intval($_GET['sura']); 545 if($sura < 1 || $sura > 114) { 546 wp_send_json_error(esc_html__('Numéro de sourate invalide', 'quran-text-multilanguage')); 547 return; 548 } 549 550 // Vérification de l'origine des fichiers MP3 551 $allowed_domains = array('quran.s3.fr-par.scw.cloud'); 552 $mp3_url = 'https://quran.s3.fr-par.scw.cloud/'; 553 554 if(!in_array(parse_url($mp3_url, PHP_URL_HOST), $allowed_domains)) { 555 wp_send_json_error('Origine des fichiers MP3 non autorisée'); 556 return; 557 } 558 559 // ... reste du code existant ... 560 } -
quran-text-multilanguage/trunk/readme.txt
r3284108 r3285559 3 3 Contributors: karim42 4 4 Donate link: https://www.paypal.com/paypalme/gpcodex 5 Tags: muslim, quran, quran multilanguage, coran , coran en texte, quran text, quran translate, islam, muslim, audio verse, quran verse, coran verset, audio verset, full download5 Tags: quran, islam, muslim, audio, multilanguage 6 6 Requires at least: 3.0.1 7 7 Tested up to: 6.6.1 8 8 9 Stable tag: 69 Stable tag: 2.3.24 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 12 13 13 A comprehensive Quran plugin offering multilingual text translations in 30 languages, audio recitations from 32 reciters, and a fully customizable interface. 14 14 15 15 == Description ==
Note: See TracChangeset
for help on using the changeset viewer.