Plugin Directory

Changeset 2967829


Ignore:
Timestamp:
09/16/2023 03:46:34 PM (2 years ago)
Author:
awsmin
Message:

V 3.4.3 - 2023-09-15

  • Fixed: Medium severity vulnerability (Sensitive Data Exposure via Directory Listing).
  • Minor bug fixes and code improvements.
Location:
wp-job-openings/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-job-openings/trunk/inc/class-awsm-job-openings-form.php

    r2956872 r2967829  
    3434
    3535        add_filter( 'wp_check_filetype_and_ext', array( $this, 'check_filetype_and_ext' ), 10, 5 );
     36        add_action( 'add_attachment', array( $this, 'add_index_php_to_folders' ) );
    3637    }
    3738
     
    367368        }
    368369        return $param;
     370    }
     371
     372    public function add_index_php_to_folders( $attachment_id ) {
     373        // phpcs:ignore WordPress.Security.NonceVerification.Missing
     374        if ( isset( $_POST['action'] ) && $_POST['action'] === 'awsm_applicant_form_submission' ) {
     375            $file_path = get_attached_file( $attachment_id );
     376            if ( strpos( $file_path, AWSM_JOBS_UPLOAD_DIR_NAME ) !== false ) {
     377                $directory_path = dirname( $file_path );
     378                $index_php_file = $directory_path . '/index.php';
     379                if ( ! file_exists( $index_php_file ) ) {
     380                    $index_php_content = '<?php\n\n//Silence is golden.\n';
     381                    file_put_contents( $index_php_file, $index_php_content );
     382                }
     383            }
     384        }
    369385    }
    370386
  • wp-job-openings/trunk/languages/wp-job-openings.pot

    r2956872 r2967829  
    88"Content-Transfer-Encoding: 8bit\n"
    99"Language-Team: AWSM innovations <hello@awsm.in>\n"
    10 "POT-Creation-Date: 2023-08-22 12:41+0000\n"
     10"POT-Creation-Date: 2023-09-15 12:43+0000\n"
    1111"X-Poedit-Basepath: ..\n"
    1212"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    1616"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1717
    18 #: wp-job-openings.php:247
     18#: wp-job-openings.php:269
    1919msgid "Jobs"
    2020msgstr ""
    2121
    22 #: wp-job-openings.php:319, admin/class-awsm-job-openings-info.php:266, admin/class-awsm-job-openings-settings.php:48, admin/class-awsm-job-openings-settings.php:48, admin/templates/base.php:13
     22#: wp-job-openings.php:341, admin/class-awsm-job-openings-info.php:266, admin/class-awsm-job-openings-settings.php:48, admin/class-awsm-job-openings-settings.php:48, admin/templates/base.php:13
    2323msgid "Settings"
    2424msgstr ""
    2525
    26 #: wp-job-openings.php:326, inc/widgets/class-awsm-job-openings-dashboard-widget.php:55, admin/templates/meta/job-status.php:30
     26#: wp-job-openings.php:348, inc/widgets/class-awsm-job-openings-dashboard-widget.php:55, admin/templates/meta/job-status.php:30
    2727msgid "Job Title"
    2828msgstr ""
    2929
    30 #: wp-job-openings.php:327
     30#: wp-job-openings.php:349
    3131msgid "Job ID"
    3232msgstr ""
    3333
    34 #: wp-job-openings.php:329, wp-job-openings.php:1099, admin/class-awsm-job-openings-info.php:260, inc/class-awsm-job-openings-core.php:121, inc/class-awsm-job-openings-core.php:123, inc/class-awsm-job-openings-core.php:124, inc/widgets/class-awsm-job-openings-dashboard-widget.php:58, admin/templates/meta/job-status.php:118, admin/templates/overview/widgets/job-listings.php:27
     34#: wp-job-openings.php:351, wp-job-openings.php:1121, admin/class-awsm-job-openings-info.php:260, inc/class-awsm-job-openings-core.php:121, inc/class-awsm-job-openings-core.php:123, inc/class-awsm-job-openings-core.php:124, inc/widgets/class-awsm-job-openings-dashboard-widget.php:58, admin/templates/meta/job-status.php:118, admin/templates/overview/widgets/job-listings.php:27
    3535msgid "Applications"
    3636msgstr ""
    3737
    38 #: wp-job-openings.php:330, inc/widgets/class-awsm-job-openings-dashboard-widget.php:66
     38#: wp-job-openings.php:352, inc/widgets/class-awsm-job-openings-dashboard-widget.php:66
    3939msgid "Expiry"
    4040msgstr ""
    4141
    42 #: wp-job-openings.php:331, inc/widgets/class-awsm-job-openings-dashboard-widget.php:63
     42#: wp-job-openings.php:353, inc/widgets/class-awsm-job-openings-dashboard-widget.php:63
    4343msgid "Views"
    4444msgstr ""
    4545
    46 #: wp-job-openings.php:332
     46#: wp-job-openings.php:354
    4747msgid "Conversion"
    4848msgstr ""
    4949
    50 #: wp-job-openings.php:448, admin/templates/overview/widgets/recent-applications.php:24
     50#: wp-job-openings.php:470, admin/templates/overview/widgets/recent-applications.php:24
    5151msgid "Applicant"
    5252msgstr ""
    5353
    54 #: wp-job-openings.php:449, admin/templates/overview/widgets/job-listings.php:23
     54#: wp-job-openings.php:471, admin/templates/overview/widgets/job-listings.php:23
    5555msgid "ID"
    5656msgstr ""
    5757
    58 #: wp-job-openings.php:450, inc/class-awsm-job-openings-core.php:58, inc/templates/mail/email-digest.php:67
     58#: wp-job-openings.php:472, inc/class-awsm-job-openings-core.php:58, inc/templates/mail/email-digest.php:67
    5959msgid "Job"
    6060msgstr ""
    6161
    62 #: wp-job-openings.php:451, inc/templates/mail/email-digest.php:68
     62#: wp-job-openings.php:473, inc/templates/mail/email-digest.php:68
    6363msgid "Applied on"
    6464msgstr ""
    6565
    66 #: wp-job-openings.php:479
     66#: wp-job-openings.php:501
    6767msgid "View Job: "
    6868msgstr ""
    6969
    70 #: wp-job-openings.php:487, admin/templates/meta/job-status.php:68, admin/templates/overview/widgets/recent-applications.php:34
     70#: wp-job-openings.php:509, admin/templates/meta/job-status.php:68, admin/templates/overview/widgets/recent-applications.php:34
    7171msgid "ago"
    7272msgstr ""
    7373
    74 #: wp-job-openings.php:497, wp-job-openings.php:517, wp-job-openings.php:762, wp-job-openings.php:1978, admin/templates/meta/job-status.php:54
     74#: wp-job-openings.php:519, wp-job-openings.php:539, wp-job-openings.php:784, wp-job-openings.php:2000, admin/templates/meta/job-status.php:54
    7575msgid "Expired"
    7676msgstr ""
    7777
    7878#. translators: %s: posts count with expired status
    79 #: wp-job-openings.php:504
     79#: wp-job-openings.php:526
    8080msgid "Expired <span class=\"count\">(%s)</span>"
    8181msgid_plural "Expired <span class=\"count\">(%s)</span>"
     
    8383msgstr[1] ""
    8484
    85 #: wp-job-openings.php:700
     85#: wp-job-openings.php:722
    8686msgid "Email Digest - WP Job Openings"
    8787msgstr ""
    8888
    89 #: wp-job-openings.php:759
     89#: wp-job-openings.php:781
    9090msgid "Published"
    9191msgstr ""
    9292
    93 #: wp-job-openings.php:759
     93#: wp-job-openings.php:781
    9494msgid "Current Openings"
    9595msgstr ""
    9696
    97 #: wp-job-openings.php:762
     97#: wp-job-openings.php:784
    9898msgid "Inactive"
    9999msgstr ""
    100100
    101 #: wp-job-openings.php:783
     101#: wp-job-openings.php:805
    102102msgid "All Jobs"
    103103msgstr ""
    104104
    105 #: wp-job-openings.php:861
     105#: wp-job-openings.php:883
    106106msgid "JavaScript is required! Please enable it in your browser."
    107107msgstr ""
    108108
    109109#. translators: %1$s: opening html tag, %2$s: closing html tag, %3$s: Jobs count, %4$s: Plugin rating site
    110 #: wp-job-openings.php:879
     110#: wp-job-openings.php:901
    111111msgid "That's awesome! You have just published %3$sth job posting on your wesbite using %1$sWP Job Openings%2$s. Could you please do us a BIG favor and give it a %1$s5-star%2$s rating on %4$s? Just to help us spread the word and boost our motivation."
    112112msgstr ""
    113113
    114114#. translators: %1$s: opening html tag, %2$s: closing html tag, %3$s: Applications count, %4$s: Plugin rating site
    115 #: wp-job-openings.php:882
     115#: wp-job-openings.php:904
    116116msgid "You have received over %1$s%3$s%2$s job applications through %1$sWP Job Openings%2$s. That's awesome! May we ask you to give it a %1$s5-Star%2$s rating on %4$s. It will help us spread the word and boost our motivation."
    117117msgstr ""
    118118
    119 #: wp-job-openings.php:888
     119#: wp-job-openings.php:910
    120120msgid "Ok, you deserve it"
    121121msgstr ""
    122122
    123 #: wp-job-openings.php:889
     123#: wp-job-openings.php:911
    124124msgid "I already did"
    125125msgstr ""
    126126
    127 #: wp-job-openings.php:890
     127#: wp-job-openings.php:912
    128128msgid "Maybe later"
    129129msgstr ""
    130130
    131 #: wp-job-openings.php:959
     131#: wp-job-openings.php:981
    132132msgid "Invalid request!"
    133133msgstr ""
    134134
    135 #: wp-job-openings.php:965
     135#: wp-job-openings.php:987
    136136msgid "Invalid context!"
    137137msgstr ""
    138138
    139 #: wp-job-openings.php:1013
     139#: wp-job-openings.php:1035
    140140msgid "Loading..."
    141141msgstr ""
    142142
    143 #: wp-job-openings.php:1015
     143#: wp-job-openings.php:1037
    144144msgid "Error in submitting your application. Please try again later!"
    145145msgstr ""
    146146
    147 #: wp-job-openings.php:1016
     147#: wp-job-openings.php:1038
    148148msgid "The file you have selected is too large."
    149149msgstr ""
    150150
    151 #: wp-job-openings.php:1080, admin/templates/general.php:20
     151#: wp-job-openings.php:1102, admin/templates/general.php:20
    152152msgid "Select a page"
    153153msgstr ""
    154154
    155 #: wp-job-openings.php:1082, admin/class-awsm-job-openings-settings.php:1131
     155#: wp-job-openings.php:1104, admin/class-awsm-job-openings-settings.php:1131
    156156msgid "Select Image"
    157157msgstr ""
    158158
    159 #: wp-job-openings.php:1083, admin/class-awsm-job-openings-settings.php:1134
     159#: wp-job-openings.php:1105, admin/class-awsm-job-openings-settings.php:1134
    160160msgid "Change Image"
    161161msgstr ""
    162162
    163 #: wp-job-openings.php:1084, admin/class-awsm-job-openings-settings.php:1130
     163#: wp-job-openings.php:1106, admin/class-awsm-job-openings-settings.php:1130
    164164msgid "No Image selected"
    165165msgstr ""
    166166
    167 #: wp-job-openings.php:1085
     167#: wp-job-openings.php:1107
    168168msgid "Select or Upload an Image"
    169169msgstr ""
    170170
    171 #: wp-job-openings.php:1086
     171#: wp-job-openings.php:1108
    172172msgid "Choose"
    173173msgstr ""
    174174
    175175#. translators: %1$s: application id, %2$s: job title
    176 #: wp-job-openings.php:1198
     176#: wp-job-openings.php:1220
    177177msgid "Application #%1$s for %2$s"
    178178msgstr ""
    179179
    180180#. translators: %s: application submission time
    181 #: wp-job-openings.php:1207
     181#: wp-job-openings.php:1229
    182182msgid "Submitted on %s"
    183183msgstr ""
    184184
    185 #: wp-job-openings.php:1211
     185#: wp-job-openings.php:1233
    186186msgid "from IP "
    187187msgstr ""
    188188
    189 #: wp-job-openings.php:1432
     189#: wp-job-openings.php:1454
    190190msgid "View Applications"
    191191msgstr ""
    192192
    193 #: wp-job-openings.php:1624
     193#: wp-job-openings.php:1646
    194194msgid "Closing on"
    195195msgstr ""
    196196
    197 #: wp-job-openings.php:1626
     197#: wp-job-openings.php:1648
    198198msgid "Expired on"
    199199msgstr ""
    200200
    201 #: wp-job-openings.php:1628
     201#: wp-job-openings.php:1650
    202202msgid "M j, Y"
    203203msgstr ""
    204204
    205 #: wp-job-openings.php:1737
     205#: wp-job-openings.php:1759
    206206msgid "Full Time"
    207207msgstr ""
    208208
    209 #: wp-job-openings.php:1738
     209#: wp-job-openings.php:1760
    210210msgid "Part Time"
    211211msgstr ""
    212212
    213 #: wp-job-openings.php:1739
     213#: wp-job-openings.php:1761
    214214msgid "Freelance"
    215215msgstr ""
    216216
    217 #: wp-job-openings.php:1740
     217#: wp-job-openings.php:1762
    218218msgid "Temporary"
    219219msgstr ""
    220220
    221 #: wp-job-openings.php:1741
     221#: wp-job-openings.php:1763
    222222msgid "Intern"
    223223msgstr ""
    224224
    225 #: wp-job-openings.php:1742
     225#: wp-job-openings.php:1764
    226226msgid "Volunteer"
    227227msgstr ""
    228228
    229 #: wp-job-openings.php:1743
     229#: wp-job-openings.php:1765
    230230msgid "Per Diem"
    231231msgstr ""
    232232
    233 #: wp-job-openings.php:1744
     233#: wp-job-openings.php:1766
    234234msgid "Other"
    235235msgstr ""
     
    352352msgstr ""
    353353
    354 #: admin/class-awsm-job-openings-meta.php:88, inc/class-awsm-job-openings-form.php:87
     354#: admin/class-awsm-job-openings-meta.php:88, inc/class-awsm-job-openings-form.php:88
    355355msgid "Phone"
    356356msgstr ""
    357357
    358 #: admin/class-awsm-job-openings-meta.php:91, inc/class-awsm-job-openings-form.php:73
     358#: admin/class-awsm-job-openings-meta.php:91, inc/class-awsm-job-openings-form.php:74
    359359msgid "Email"
    360360msgstr ""
    361361
    362 #: admin/class-awsm-job-openings-meta.php:94, inc/class-awsm-job-openings-form.php:100
     362#: admin/class-awsm-job-openings-meta.php:94, inc/class-awsm-job-openings-form.php:101
    363363msgid "Cover Letter"
    364364msgstr ""
     
    879879
    880880#. translators: %1$s: comma-separated list of allowed file types
    881 #: inc/class-awsm-job-openings-form.php:62
     881#: inc/class-awsm-job-openings-form.php:63
    882882msgid "Allowed Type(s): %1$s"
    883883msgstr ""
    884884
    885 #: inc/class-awsm-job-openings-form.php:67
     885#: inc/class-awsm-job-openings-form.php:68
    886886msgid "Full Name"
    887887msgstr ""
    888888
    889 #: inc/class-awsm-job-openings-form.php:82
     889#: inc/class-awsm-job-openings-form.php:83
    890890msgid "Please enter a valid email address."
    891891msgstr ""
    892892
    893 #: inc/class-awsm-job-openings-form.php:95
     893#: inc/class-awsm-job-openings-form.php:96
    894894msgid "Please enter a valid phone number."
    895895msgstr ""
    896896
    897 #: inc/class-awsm-job-openings-form.php:109
     897#: inc/class-awsm-job-openings-form.php:110
    898898msgid "Upload CV/Resume"
    899899msgstr ""
    900900
    901 #: inc/class-awsm-job-openings-form.php:152, inc/class-awsm-job-openings-form.php:277
     901#: inc/class-awsm-job-openings-form.php:153, inc/class-awsm-job-openings-form.php:278
    902902msgid "This field is required."
    903903msgstr ""
    904904
    905 #: inc/class-awsm-job-openings-form.php:193
     905#: inc/class-awsm-job-openings-form.php:194
    906906msgid "--Please Choose an Option--"
    907907msgstr ""
    908908
    909 #: inc/class-awsm-job-openings-form.php:409, inc/class-awsm-job-openings-third-party.php:91
     909#: inc/class-awsm-job-openings-form.php:425, inc/class-awsm-job-openings-third-party.php:91
    910910msgid "Error in submitting your application. Please refresh the page and retry."
    911911msgstr ""
    912912
    913 #: inc/class-awsm-job-openings-form.php:416
     913#: inc/class-awsm-job-openings-form.php:432
    914914msgid "Please verify that you are not a robot."
    915915msgstr ""
    916916
    917 #: inc/class-awsm-job-openings-form.php:421
     917#: inc/class-awsm-job-openings-form.php:437
    918918msgid "Please agree to our privacy policy."
    919919msgstr ""
    920920
    921 #: inc/class-awsm-job-openings-form.php:427
     921#: inc/class-awsm-job-openings-form.php:443
    922922msgid "Error occurred: Invalid Job."
    923923msgstr ""
    924924
    925 #: inc/class-awsm-job-openings-form.php:430, inc/template-functions.php:252
     925#: inc/class-awsm-job-openings-form.php:446, inc/template-functions.php:252
    926926msgid "Sorry! This job has expired."
    927927msgstr ""
    928928
    929 #: inc/class-awsm-job-openings-form.php:433
     929#: inc/class-awsm-job-openings-form.php:449
    930930msgid "Name is required."
    931931msgstr ""
    932932
    933 #: inc/class-awsm-job-openings-form.php:439
     933#: inc/class-awsm-job-openings-form.php:455
    934934msgid "Invalid email format."
    935935msgstr ""
    936936
    937 #: inc/class-awsm-job-openings-form.php:436
     937#: inc/class-awsm-job-openings-form.php:452
    938938msgid "Email is required."
    939939msgstr ""
    940940
    941 #: inc/class-awsm-job-openings-form.php:446
     941#: inc/class-awsm-job-openings-form.php:462
    942942msgid "Invalid phone number."
    943943msgstr ""
    944944
    945 #: inc/class-awsm-job-openings-form.php:443
     945#: inc/class-awsm-job-openings-form.php:459
    946946msgid "Contact number is required."
    947947msgstr ""
    948948
    949 #: inc/class-awsm-job-openings-form.php:450
     949#: inc/class-awsm-job-openings-form.php:466
    950950msgid "Cover Letter cannot be empty."
    951951msgstr ""
    952952
    953 #: inc/class-awsm-job-openings-form.php:453
     953#: inc/class-awsm-job-openings-form.php:469
    954954msgid "Please select your cv/resume."
    955955msgstr ""
    956956
    957 #: inc/class-awsm-job-openings-form.php:456
     957#: inc/class-awsm-job-openings-form.php:472
    958958msgid "Private job submission is not allowed."
    959959msgstr ""
    960960
    961 #: inc/class-awsm-job-openings-form.php:538
     961#: inc/class-awsm-job-openings-form.php:554
    962962msgid "Your application has been submitted."
    963963msgstr ""
    964964
    965 #: inc/class-awsm-job-openings-form.php:631
     965#: inc/class-awsm-job-openings-form.php:647
    966966msgid "The following errors have occurred:"
    967967msgstr ""
  • wp-job-openings/trunk/readme.txt

    r2957221 r2967829  
    33Tags: jobs, job listing, job openings, job board, careers page, jobs page, wp job opening, jobs plugin
    44Requires at least: 4.8
    5 Tested up to: 6.3
     5Tested up to: 6.3.1
    66Requires PHP: 5.6
    77Stable tag: trunk
     
    104104== Changelog ==
    105105
     106= V 3.4.3 - 2023-09-15 =
     107* Fixed: Medium severity vulnerability (Sensitive Data Exposure via Directory Listing).
     108* Minor bug fixes and code improvements.
     109
    106110= V 3.4.2 - 2023-08-22 =
    107111* Minor bug fixes and code improvements.
  • wp-job-openings/trunk/wp-job-openings.php

    r2956872 r2967829  
    66 * Author: AWSM Innovations
    77 * Author URI: https://awsm.in/
    8  * Version: 3.4.2
     8 * Version: 3.4.3
    99 * Requires at least: 4.8
    1010 * Requires PHP: 5.6
     
    3838}
    3939if ( ! defined( 'AWSM_JOBS_PLUGIN_VERSION' ) ) {
    40     define( 'AWSM_JOBS_PLUGIN_VERSION', '3.4.2' );
     40    define( 'AWSM_JOBS_PLUGIN_VERSION', '3.4.3' );
    4141}
    4242if ( ! defined( 'AWSM_JOBS_UPLOAD_DIR_NAME' ) ) {
     
    7979
    8080        add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
     81        add_action( 'plugins_loaded', array( $this, 'upgrade' ) );
    8182        add_action( 'after_setup_theme', array( $this, 'template_functions' ) );
    8283        add_action( 'init', array( $this, 'init_actions' ) );
     
    185186    public function load_textdomain() {
    186187        load_plugin_textdomain( 'wp-job-openings', false, basename( dirname( __FILE__ ) ) . '/languages' );
     188    }
     189
     190    public function upgrade() {
     191        if ( intval( get_option( 'awsm_jobs_upgrade_count' ) ) !== 1 ) {
     192            $upload_dir = wp_upload_dir();
     193            $base_dir   = trailingslashit( $upload_dir['basedir'] );
     194            $upload_dir = $base_dir . AWSM_JOBS_UPLOAD_DIR_NAME;
     195            $this->index_to_upload_dir( $upload_dir );
     196            update_option( 'awsm_jobs_upgrade_count', 1 );
     197        }
     198    }
     199
     200    public function index_to_upload_dir( $dir ) {
     201        $index_file = $dir . '/index.php';
     202        if ( ! file_exists( $index_file ) ) {
     203            file_put_contents( $index_file, "<?php\n\n//Silence is golden.\n" );
     204        }
     205        $sub_dirs = array_filter( glob( $dir . '/*' ), 'is_dir' );
     206        foreach ( $sub_dirs as $sub_dir ) {
     207            $this->index_to_upload_dir( $sub_dir );
     208        }
    187209    }
    188210
Note: See TracChangeset for help on using the changeset viewer.