diff --git a/.gitignore b/.gitignore
index f00fed8e8..c932383a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea/*
data/*
!data/.gitkeep
plugins/*
diff --git a/README.md b/README.md
index 2abc35efb..d6ed4183f 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,14 @@
+# ICEcoder is for sale! Please contact info@icecoder.net. Serious offers only.
+
+---
+
# ICEcoder
## Code editor awesomeness ...in your browser
ICEcoder is a browser based code editor, which provides a modern approach to building websites. By allowing you to code directly within the web browser, online or offline, it means you only need one program (your browser) to develop sites, plus can test on actual web servers. After development, you can also maintain the website easily, all of which make for speedy and smart development.
-
+
### Requirements
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000..f2562d0da
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,5 @@
+# Security Policy
+
+## Reporting a Vulnerability
+
+Please report security issues to `info@icecoder.net`
\ No newline at end of file
diff --git a/assets/css/icecoder.css b/assets/css/icecoder.css
index 02b207aff..56983d306 100644
--- a/assets/css/icecoder.css
+++ b/assets/css/icecoder.css
@@ -13,6 +13,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
.blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100}
.blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
.popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px}
+.popupVCenter .popup .imgDisplay {border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('http://github.com/images/checkerboard.png')}
.floatingContainer {position: absolute; top: 0; left: 0; width: 55px; height: 55px; visibility: hidden; border: solid 1px #444; image-rendering: pixelated}
.floatingContainer:before {position: absolute; display: inline-block; width: 3px; height: 3px; left: 25px; top: 25px; content: ''; border: solid 1px #b00}
@@ -74,7 +75,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
.files .tools .error {background: #800}
.files .tools .info {background: #080}
-.editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
+.editor {position: fixed; display: inline-block; top: 0; left: 15px; width: 2400px}
.editor .tabsBar {display: inline-block; height: 27px; width: 2400px; margin-top: 15px; padding-left: 53px; background: #fff}
.tabsBar .tab {position: absolute; display: none; height: 15px; padding: 6px 8px 6px 9px; border-right: 1px solid #ddd; color: #fff; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 1;
transition: width, left 0.15s ease-in-out;
diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js
index 4c224b640..da7c4b4e2 100644
--- a/assets/js/icecoder.js
+++ b/assets/js/icecoder.js
@@ -10,8 +10,9 @@ var ICEcoder = {
// INIT
// ====
- // URL we're viewing ICEcoder from
+ // URLs we're viewing ICEcoder and its assets from
iceLoc: window.location.origin + window.location.pathname.replace(/\/$/, ""),
+ assetsLoc: get('icecoderJSFile').dataset.assetsRoot,
// Define settings
filesW: 250, // Width of files pane
@@ -2899,10 +2900,14 @@ var ICEcoder = {
},
findOnInput: function() {
+ let thisCM, selectNext;
// Realtime finding - only action for finding in current doc
if ("" !== get('find').value && t['this document'] === document.findAndReplace.target.value) {
- // Considers selecting next on value input, according to user setting
- ICEcoder.findReplace(get('find').value, true === ICEcoder.selectNextOnFindInput, false, false);
+ // Get CM pane
+ thisCM = this.getThisCM();
+ // Consider selecting next on value input, according to not having result selected already and user setting
+ selectNext = thisCM.getSelection() !== get('find').value && true === ICEcoder.selectNextOnFindInput;
+ ICEcoder.findReplace(get('find').value, selectNext, false, false);
get("find").focus();
// Reset results display
} else {
@@ -4425,7 +4430,7 @@ var ICEcoder = {
this.openFiles.push(shortURL);
// Setup a new tab
- closeTabLink = '
';
+ closeTabLink = '
';
get('tab' + (this.openFiles.length)).style.display = "inline-block";
fileName = this.openFiles[this.openFiles.length - 1];
fileExt = fileName.substr(fileName.lastIndexOf(".") + 1);
@@ -4473,7 +4478,7 @@ var ICEcoder = {
this.openFiles[tabNum - 1] = newName;
// Setup a new tab
- closeTabLink = '
';
+ closeTabLink = '
';
fileName = this.openFiles[tabNum - 1];
fileExt = fileName.substr(fileName.lastIndexOf(".") + 1);
get('tab' + tabNum).innerHTML = closeTabLink + "" + fileName.slice(fileName.lastIndexOf("/")).replace(/\//, "");
@@ -5297,7 +5302,7 @@ var ICEcoder = {
"height": 55,
"top": -55,
"left": 0,
- "title": "
Code editor awesomeness ...in your browser",
+ "title": "
Code editor awesomeness ...in your browser",
"message": "View the quick start tutorial? (Well worthwhile!) or skip it.",
"button": "view tutorial"
},
diff --git a/classes/File.php b/classes/File.php
index e9522a058..c7177e424 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -111,7 +111,7 @@ public function updateFileManager($action, $fileLoc, $fileName, $perms, $oldFile
public function load() {
global $file, $fileLoc, $fileName, $t, $lineNumber;
echo 'action="http://github.com/load";';
- $lineNumber = max(isset($_REQUEST['lineNumber']) ? intval($_REQUEST['lineNumber']) : 1, 1);
+ $lineNumber = max(isset($_GET['lineNumber']) ? intval($_GET['lineNumber']) : 1, 1);
// Check this file isn't on the banned list at all
$canOpen = true;
for ($i = 0; $i < count($_SESSION['bannedFiles']); $i++) {
@@ -234,7 +234,7 @@ public function returnLoadImageScript() {
parent.parent.document.getElementById(\'blackMask\').style.visibility = "visible";
parent.parent.document.getElementById(\'mediaContainer\').innerHTML =
"" +
- " 700 || this.naturalHeight > 500) ? \', ' .$t['displayed at'] . '\' + this.width + \' x \' + this.height : \'\'; document.getElementById(\'imgInfo\').innerHTML += \' (\' + this.naturalWidth + \' x \' + this.naturalHeight + reducedImgMsg + \')\'; ICEcoder.initCanvasImage(this); ICEcoder.interactCanvasImage(this)\">
" +
+ " 700 || this.naturalHeight > 500) ? \', ' .$t['displayed at'] . '\' + this.width + \' x \' + this.height : \'\'; document.getElementById(\'imgInfo\').innerHTML += \' (\' + this.naturalWidth + \' x \' + this.naturalHeight + reducedImgMsg + \')\'; ICEcoder.initCanvasImage(this); ICEcoder.interactCanvasImage(this)\">
" +
"