Making WordPress.org

Changeset 9109


Ignore:
Timestamp:
08/19/2019 04:52:01 AM (7 years ago)
Author:
dd32
Message:

Trac: Add yet-another anti-pentesting notice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/trac-security.js

    r9074 r9109  
    6464            );
    6565        }
     66    }
    6667
     68    function show_pentest_notice() {
     69        if ( ! $( '#security-pentest-notice' ).length ) {
     70            // Add a notice
     71            $( '.buttons' ).before(
     72                '<div class="newticket-not-here wp-notice" style="background-color: #ffe6e6; border-color: red;"><p id="security-pentest-notice" class="security">' +
     73                '<span class="dashicons dashicons-lock"></span>' +
     74                '<strong>Please Note:</strong> ' +
     75                'Performing penetration testing against our trac instances without prior approval is strictly forbidden and will result in any vulnerabilities found being ineligible for bounties per our guidelines.' +
     76                '</p></div>'
     77            );
     78        }
    6779    }
    6880
     
    7688        var entry = $el.val();
    7789
    78         if ( wp.trac_security.has_overlap( entry, wp.trac_security.badwords ) ) {
     90        if ( wp.trac_security.seems_like_pentest( entry ) ) {
    7991            show_box();
    80         } else if ( wp.trac_security.seems_like_pentest( entry ) ) {
     92            show_pentest_notice();
     93        } else if ( wp.trac_security.has_overlap( entry, wp.trac_security.badwords ) ) {
    8194            show_box();
    8295        } else {
Note: See TracChangeset for help on using the changeset viewer.