|
| 1 | +--- |
| 2 | +meta: |
| 3 | + author: "Joost de Keijzer" |
| 4 | + description: "Wordpress Rule Exclusions Plugin" |
| 5 | +rule_id: 9507144 |
| 6 | +tests: |
| 7 | + - test_id: 1 |
| 8 | + desc: Editing template part of a website i.e header or footer |
| 9 | + stages: |
| 10 | + - input: |
| 11 | + dest_addr: 127.0.0.1 |
| 12 | + headers: |
| 13 | + Host: localhost |
| 14 | + User-Agent: OWASP CRS test agent |
| 15 | + Accept: application/json, */*;q=0.1 |
| 16 | + Content-Type: application/json |
| 17 | + x-http-method-override: PUT |
| 18 | + port: 80 |
| 19 | + method: POST |
| 20 | + version: "HTTP/1.1" |
| 21 | + # URI is actually sent with double slashes |
| 22 | + uri: /index.php?rest_route=/wp/v2/template-parts/twentytwentyfour//header&_locale=user |
| 23 | + # Data is sent with some special characters escaped |
| 24 | + data: | |
| 25 | + {"id":"twentytwentyfour//header","content":"<!-- wp:group {\"align\":\"wide\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"20px\",\"bottom\":\"20px\"}}},\"backgroundColor\":\"base\",\"layout\":{\"type\":\"constrained\"}} -->\n<div class=\"wp-block-group alignwide has-base-background-color has-background\" style=\"padding-top:20px;padding-bottom:20px\"><!-- wp:group {\"align\":\"wide\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"space-between\",\"flexWrap\":\"wrap\"}} -->\n<div class=\"wp-block-group alignwide\"><!-- wp:group {\"style\":{\"spacing\":{\"blockGap\":\"var:preset|spacing|20\"},\"layout\":{\"selfStretch\":\"fit\",\"flexSize\":null}},\"layout\":{\"type\":\"flex\"}} -->\n<div class=\"wp-block-group\"><!-- wp:site-logo {\"width\":60} /-->\n\n<!-- wp:group {\"style\":{\"spacing\":{\"blockGap\":\"0px\"}}} -->\n<div class=\"wp-block-group\"> |
| 26 | + <!-- wp:site-title {\"level\":0} /--></div>\n<!-- /wp:group --></div>\n<!-- /wp:group -->\n\n<!-- wp:paragraph -->\n<p>testing</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:group {\"layout\":{\"type\":\"flex\",\"flexWrap\":\"wrap\",\"justifyContent\":\"left\"}} -->\n<div class=\"wp-block-group\"><!-- wp:navigation {\"ref\":21,\"style\":{\"spacing\":{\"margin\":{\"top\":\"0\"},\"blockGap\":\"var:preset|spacing|20\"},\"layout\":{\"selfStretch\":\"fit\",\"flexSize\":null}},\"layout\":{\"type\":\"flex\",\"justifyContent\":\"right\",\"orientation\":\"horizontal\"}} /--></div>\n<!-- /wp:group --></div>\n<!-- /wp:group --></div>\n<!-- /wp:group -->"} |
| 27 | + output: |
| 28 | + log: |
| 29 | + no_expect_ids: [920450] |
| 30 | + - test_id: 2 |
| 31 | + desc: Editing global styles for a theme |
| 32 | + stages: |
| 33 | + - input: |
| 34 | + dest_addr: 127.0.0.1 |
| 35 | + headers: |
| 36 | + Host: localhost |
| 37 | + User-Agent: OWASP CRS test agent |
| 38 | + Accept: application/json, */*;q=0.1 |
| 39 | + Content-Type: application/json |
| 40 | + x-http-method-override: PUT |
| 41 | + port: 80 |
| 42 | + method: POST |
| 43 | + version: "HTTP/1.1" |
| 44 | + uri: /index.php?rest_route=/wp/v2/global-styles/26&_locale=user |
| 45 | + data: | |
| 46 | + {"id":26,"settings":{"color":{"duotone":{"theme":[{"colors":["#272727","#f9f9f9"],"slug":"duotone-1","name":"Donkergrijs en wit"},{"colors":["#272727","#5F584F"],"slug":"duotone-2","name":"Donkergrijs en walnoot"},{"colors":["#272727","#973C20"],"slug":"duotone-3","name":"Donkergrijs en kaneel"},{"colors":["#272727","#4D5B48"],"slug":"duotone-4","name":"Donkergrijs en olijfgroen"},{"colors":["#272727","#4F5959"],"slug":"duotone-5","name":"Donkergrijs en staal"}]},"gradients":{"theme":[{"slug":"gradient-1","gradient":"linear-gradient(to bottom, #5F584F 0%, #272727 100%)","name":"Verticaal zacht drijfhout naar donkergrijs"},{"slug":"gradient-2","gradient":"linear-gradient(to bottom, #6D533C 0%, #272727 100%)","name":"Verticaal zacht walnoot naar donkergrijs"}, |
| 47 | + {"slug":"gradient-3","gradient":"linear-gradient(to bottom, #973C20 0%, #272727 100%)","name":"Verticaal zacht kaneel naar donkergrijs"},{"slug":"gradient-4","gradient":"linear-gradient(to bottom, #4D5B48 0%, #272727 100%)","name":"Verticaal zacht olijf naar donkergrijs"},{"slug":"gradient-5","gradient":"linear-gradient(to bottom, #4F5959 0%, #272727 100%)","name":"Verticaal zacht staal naar donkergrijs"},{"slug":"gradient-6","gradient":"linear-gradient(to bottom, #909090 0%, #272727 100%)","name":"Verticaal zacht tin naar donkergrijs"},{"slug":"gradient-7","gradient":"linear-gradient(to bottom, #5F584F 50%, #272727 50%)","name":"Verticaal hard beige naar donkergrijs"},{"slug":"gradient-8","gradient":"linear-gradient(to bottom, #6D533C 50%, #272727 50%)","name":"Verticaal hard walnoot naar donkergrijs"}, |
| 48 | + {"slug":"gradient-9","gradient":"linear-gradient(to bottom, #973C20 50%, #272727 50%)","name":"Verticaal hard kaneel naar donkergrijs"},{"slug":"gradient-10","gradient":"linear-gradient(to bottom, #4D5B48 50%, #272727 50%)","name":"Verticaal hard olijf naar donkergrijs"},{"slug":"gradient-11","gradient":"linear-gradient(to bottom, #4F5959 50%, #272727 50%)","name":"Verticaal hard staal naar donkergrijs"},{"slug":"gradient-12","gradient":"linear-gradient(to bottom, #A4A4A4 50%, #272727 50%)","name":"Verticaal hard tin naar donkergrijs"}]},"palette":{"theme":[{"color":"#272727","name":"Basis","slug":"base"},{"color":"#303030","name":"Basis / Twee","slug":"base-2"},{"color":"#f9f9f9","name":"Contrast","slug":"contrast"},{"color":"#B7B7B7","name":"Contrast / Twee","slug":"contrast-2"}, |
| 49 | + {"color":"#909090","name":"Contrast / Drie","slug":"contrast-3"},{"color":"#5F584F","name":"Accent","slug":"accent"},{"color":"#6D533C","name":"Accent / Twee","slug":"accent-2"},{"color":"#973C20","name":"Accent / Drie","slug":"accent-3"},{"color":"#4D5B48","name":"Accent / Vier","slug":"accent-4"},{"color":"#4F5959","name":"Accent / Vijf","slug":"accent-5"}]}}}} |
| 50 | + output: |
| 51 | + log: |
| 52 | + no_expect_ids: [920450] |
| 53 | + - test_id: 3 |
| 54 | + desc: Editing widgets |
| 55 | + stages: |
| 56 | + - input: |
| 57 | + dest_addr: 127.0.0.1 |
| 58 | + headers: |
| 59 | + Host: localhost |
| 60 | + User-Agent: "OWASP CRS test agent" |
| 61 | + Accept: application/json, */*;q=0.1 |
| 62 | + Content-Type: application/json |
| 63 | + x-http-method-override: PUT |
| 64 | + port: 80 |
| 65 | + method: POST |
| 66 | + version: "HTTP/1.1" |
| 67 | + uri: /index.php?rest_route=/wp/v2/sidebars/sidebar-1&_locale=user |
| 68 | + data: | |
| 69 | + {"id":"sidebar-1","widgets":["search-2","recent-posts-2","recent-comments-2","archives-2","categories-2","meta-2","block-2","block-3"]} |
| 70 | + output: |
| 71 | + log: |
| 72 | + no_expect_ids: [920450] |
| 73 | + - test_id: 4 |
| 74 | + desc: Save post |
| 75 | + stages: |
| 76 | + - input: |
| 77 | + dest_addr: 127.0.0.1 |
| 78 | + headers: |
| 79 | + Host: localhost |
| 80 | + User-Agent: "OWASP CRS test agent" |
| 81 | + Accept: application/json, */*;q=0.1 |
| 82 | + Content-Type: application/json |
| 83 | + x-http-method-override: PUT |
| 84 | + port: 80 |
| 85 | + method: POST |
| 86 | + version: "HTTP/1.1" |
| 87 | + uri: /index.php?rest_route=/wp/v2/posts/1&_locale=user |
| 88 | + data: | |
| 89 | + {"id":1,"content":"<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>\n\n<!-- wp:paragraph -->\n<p>dddd</p>\n<!-- /wp:paragraph -->"} |
| 90 | + output: |
| 91 | + log: |
| 92 | + no_expect_ids: [920450] |
| 93 | + - test_id: 5 |
| 94 | + desc: Delete post |
| 95 | + stages: |
| 96 | + - input: |
| 97 | + dest_addr: 127.0.0.1 |
| 98 | + headers: |
| 99 | + Host: localhost |
| 100 | + User-Agent: "OWASP CRS test agent" |
| 101 | + Accept: application/json, */*;q=0.1 |
| 102 | + Content-Type: application/json |
| 103 | + x-http-method-override: DELETE |
| 104 | + port: 80 |
| 105 | + method: POST |
| 106 | + version: "HTTP/1.1" |
| 107 | + uri: /index.php?rest_route=/wp/v2/posts/1&_locale=user |
| 108 | + output: |
| 109 | + log: |
| 110 | + no_expect_ids: [920450] |
0 commit comments