Plugin Directory

Changeset 2719837


Ignore:
Timestamp:
05/07/2022 11:17:38 AM (4 years ago)
Author:
pedramn
Message:

Fix security issues
fix small bug

Location:
dropdown-and-scrollable-text/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dropdown-and-scrollable-text/trunk/assets/clipboard.min.js

    r2307126 r2719837  
    88var clipboard = new ClipboardJS('.btn');
    99clipboard.on('success', function(e) {
    10     console.log('hi');
     10     document.getElementById("copy-status").style.display = "inline-block";
    1111     document.getElementById("copy-status").innerHTML = "Shortcode Copied To Clipboard!";
    1212});
  • dropdown-and-scrollable-text/trunk/index.php

    r2307131 r2719837  
    55Description: Create shortcode for Dropdown Text
    66Author: Pedram Nasertorabi
    7 Version: 2.0
     7Version: 2.1
    88Author URI: http://webodid.com/
    99*/
     
    115115            padding: 11px;
    116116            color: white;
     117            display: none;
    117118        }
    118119    </style>
     
    126127            <tr>
    127128                <td>
    128                     <form method="post" action="">
     129                    <form method="post" action="<?php echo admin_url( 'admin.php?page=DST' ); ?>">
    129130                        <select id="theme" name="theme">
    130131                            <option value="3d">3d</option>
     
    161162                </td>
    162163                <td>
    163                     <form method="post" action="">
     164                    <form method="post" action="<?php echo admin_url( 'admin.php?page=DST' ); ?>">
    164165                        <input placeholder="Enter height px (EX : 200)" name="drop-height" required>
    165166                        <textarea placeholder="Enter Text Here" name="drop-content" required></textarea>
     
    174175            <?php
    175176            if ( isset( $_POST['create-scroll-shortcode'] ) ) { ?>
    176                 <?php $shortcode = '[scrollabletext theme=' . $_POST['theme'] . ' height=' . $_POST['height'] . ']' . $_POST['content'] . ' [/scrollabletext]'; ?>
     177                <?php $shortcode = '[scrollabletext theme=' . sanitize_text_field($_POST['theme'] ). ' height=' . sanitize_text_field($_POST['height'])  . ']' . sanitize_text_field($_POST['content']) . ' [/scrollabletext]'; ?>
    177178                <button class="btn copybtn" data-clipboard-text="<?php echo $shortcode ?>">
    178179                    Copy to clipboard
     
    180181                <span id="copy-status"></span>
    181182                <p class="shortcode-generated"><?php echo $shortcode ?></p>
    182                 <input value="<?php echo $shortcode ?>" <?php echo $_POST['content'] ?> type="hidden" id="shortcode">
     183                <input value="<?php echo $shortcode ?>" <?php echo sanitize_text_field($_POST['content']) ?> type="hidden" id="shortcode">
    183184            <?php } ?>
    184185            <?php
    185186            if ( isset( $_POST['create-dropdown-shortcode'] ) ) { ?>
    186                 <?php $shortcode = '[dropdowntext height=' . $_POST['drop-height'] . ']' . $_POST['drop-content'] . ' [/dropdowntext]'; ?>
     187                <?php $shortcode = '[dropdowntext height=' . sanitize_text_field($_POST['drop-height']) . ']' . sanitize_text_field($_POST['drop-content']) . ' [/dropdowntext]'; ?>
    187188                <button class="btn" data-clipboard-text="<?php echo $shortcode ?>">
    188189                    Copy to clipboard
  • dropdown-and-scrollable-text/trunk/readme.txt

    r2307126 r2719837  
    44Tags: dropdown text,scrolling text, text box
    55Requires at least: 3.0.1
    6 Tested up to: 5.4.1
    7 Stable tag: 2.0
     6Tested up to: 5.9.3
     7Stable tag: 2.1
    88Requires PHP: 5.4
    99License: GPLv2 or later
     
    3333Log into WordPress and navigate to the Plugins screen.<br>
    3434Once installed, click the Activate link.
     35
     36== Changelog ==
     37= 2.1 =
     38* Fix security issues
     39* fix small bug
     40= 2.0 =
     41* Add Easy shortcode generator and option panel
     42
     43== Upgrade Notice ==
     44= 2.1 =
     45This version fixes a security related bug. Upgrade immediately.
Note: See TracChangeset for help on using the changeset viewer.