From 2da264f9f7d190afd21e7d8c9f6d2ea6638a7e90 Mon Sep 17 00:00:00 2001 From: Graham Trott Date: Sun, 28 Feb 2021 20:26:37 +0000 Subject: [PATCH] Various updates --- dist/easycoder-min.js | 7 ++++--- dist/easycoder.js | 2 +- dist/easycoder.php | 4 ++-- dist/readme.txt | 3 +++ dist/rest.php | 1 + js/easycoder/EasyCoder.js | 2 +- resources/md/home.md | 2 +- server/easycoder.php | 4 ++-- server/readme.txt | 3 +++ server/rest.php | 1 + 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/dist/easycoder-min.js b/dist/easycoder-min.js index 251d68d..300dbab 100644 --- a/dist/easycoder-min.js +++ b/dist/easycoder-min.js @@ -3,8 +3,9 @@ $jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterat $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;bc&&(c=Math.max(c+e,0));cc&&(c=Math.max(c+e,0));cb?-c:c}},"es6","es3");$jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=$jscomp.checkStringArgs(this,b,"endsWith");b+="";void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0=e}},"es6","es3"); $jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}},"es6","es3"); @@ -228,5 +229,5 @@ f.condition=EasyCoder_Condition;f.parent=d;f.domain=this.domain;f.imports=b;f.co b.isUndefined=this.isUndefined;b.isJsonString=this.isJsonString;b.getSymbolRecord=this.getSymbolRecord;b.verifySymbol=this.verifySymbol;b.runtimeError=this.runtimeError;b.nonNumericValueError=this.nonNumericValueError;b.variableDoesNotHoldAValueError=this.variableDoesNotHoldAValueError;b.reportError=this.reportError;b.register=this.register;b.symbols=f.getSymbols();b.unblocked=!1;b.encoding="ec";b.popups=[];b.stack=[];b.queue=[0];b.module=c;b.parent=d;c&&(c.program=b.script);return b},tokeniseFile:function(a){var b= [],c=[],d=0;a.forEach(function(e,f){b.push({lino:f+1,line:e});for(var g=e.length,h="",k=!0,l=0;lsource); $dest = "../../../$resources/" . str_replace('~', '/', $json->dest); diff --git a/js/easycoder/EasyCoder.js b/js/easycoder/EasyCoder.js index ecea10b..4f4fd28 100644 --- a/js/easycoder/EasyCoder.js +++ b/js/easycoder/EasyCoder.js @@ -1,4 +1,4 @@ -EasyCoder.version = `2.7.5`; +EasyCoder.version = `2.7.6`; EasyCoder.timestamp = Date.now(); console.log(`EasyCoder loaded; waiting for page`); diff --git a/resources/md/home.md b/resources/md/home.md index 740f17d..070763f 100644 --- a/resources/md/home.md +++ b/resources/md/home.md @@ -28,4 +28,4 @@ Also look at some of our examples (/SIDEBAR/). These are complete web pages you After that it's time to add an ~ec~ script to your web page. The links /SIDEBAR/ include examples that should help you understand what you need to add to your website. If you need further help you can contact us in our [Slack](https://easycoder-software.slack.com/) channel. Don't be afraid to ask; everybody was a beginner once. -All of the source code of this website can be found in the [EasyCoder Repository](https:github.com/easycoder/easycoder.github.io). +All of the source code of this website can be found in the [EasyCoder Repository](https://github.com/easycoder/easycoder.github.io). diff --git a/server/easycoder.php b/server/easycoder.php index e82fb44..3a0b126 100644 --- a/server/easycoder.php +++ b/server/easycoder.php @@ -3,7 +3,7 @@ * Plugin Name: EasyCoder * Plugin URI: https://easycoder.software * Description: Control the appearance and behavior of your posts and pages by embedding simple English-like scripts, without the need to learn JavaScript. - * Version: 2.7.5 + * Version: 2.7.6 * Author: EasyCoder Software * Author URI: https://easycoder.software */ @@ -16,7 +16,7 @@ add_action('wp_enqueue_scripts', 'easycoder_enqueue_script', 2); function easycoder_enqueue_script() { wp_enqueue_script('easycoder_script', - 'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.5'); + 'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.6'); } // Set up default plugin and REST scripts diff --git a/server/readme.txt b/server/readme.txt index 91e80ab..af7a23e 100644 --- a/server/readme.txt +++ b/server/readme.txt @@ -54,6 +54,9 @@ For tutorials and a programmers' reference see our [EasyCoder Software Codex](ht == Changelog == += 2.7.6 23-feb 2021 = +* Fix security vulnerability. Thanks to Brett Caldwell, buckshotbrett@gmail.com + = 2.7.5 02-dec 2020 = * Fix a bug in the code to detect module running diff --git a/server/rest.php b/server/rest.php index 138274e..841adef 100644 --- a/server/rest.php +++ b/server/rest.php @@ -246,6 +246,7 @@ // Endpoint: {site root}/wp-content/plugins/easycoder/rest.php/_thumb header("Content-Type: application/json"); $value = stripslashes(file_get_contents("php://input")); + $value = str_replace( array("&", "|", ";"), '', $value); $json = json_decode($value); $source = "../../../$resources/" . str_replace('~', '/', $json->source); $dest = "../../../$resources/" . str_replace('~', '/', $json->dest);