diff --git a/backend/internal/token.js b/backend/internal/token.js index ed9a45f..0e6dec5 100644 --- a/backend/internal/token.js +++ b/backend/internal/token.js @@ -5,6 +5,8 @@ const authModel = require('../models/auth'); const helpers = require('../lib/helpers'); const TokenModel = require('../models/token'); +const ERROR_MESSAGE_INVALID_AUTH = 'Invalid email or password'; + module.exports = { /** @@ -69,15 +71,15 @@ module.exports = { }; }); } else { - throw new error.AuthError('Invalid password'); + throw new error.AuthError(ERROR_MESSAGE_INVALID_AUTH); } }); } else { - throw new error.AuthError('No password auth for user'); + throw new error.AuthError(ERROR_MESSAGE_INVALID_AUTH); } }); } else { - throw new error.AuthError('No relevant user found'); + throw new error.AuthError(ERROR_MESSAGE_INVALID_AUTH); } }); }, diff --git a/backend/schema/components/stream-object.json b/backend/schema/components/stream-object.json index 516c7f8..e177499 100644 --- a/backend/schema/components/stream-object.json +++ b/backend/schema/components/stream-object.json @@ -19,7 +19,9 @@ "incoming_port": { "type": "integer", "minimum": 1, - "maximum": 65535 + "maximum": 65535, + "if": {"properties": {"tcp_forwarding": {"const": true}}}, + "then": {"not": {"oneOf": [{"const": 80}, {"const": 443}]}} }, "forwarding_host": { "anyOf": [ diff --git a/backend/yarn.lock b/backend/yarn.lock index 5441a51..55723d3 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -830,9 +830,9 @@ crc32-stream@^4.0.2: readable-stream "^3.4.0" cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" diff --git a/docker/rootfs/etc/nginx/conf.d/include/assets.conf b/docker/rootfs/etc/nginx/conf.d/include/assets.conf index b703734..5a90beb 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/assets.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/assets.conf @@ -1,4 +1,4 @@ -location ~* ^.*\.(css|js|jpe?g|gif|png|webp|woff|eot|ttf|svg|ico|css\.map|js\.map)$ { +location ~* ^.*\.(css|js|jpe?g|gif|png|webp|woff|woff2|eot|ttf|svg|ico|css\.map|js\.map)$ { if_modified_since off; # use the public cache diff --git a/docs/src/advanced-config/index.md b/docs/src/advanced-config/index.md index efeaefe..c9b42bc 100644 --- a/docs/src/advanced-config/index.md +++ b/docs/src/advanced-config/index.md @@ -50,7 +50,6 @@ networks: Let's look at a Portainer example: ```yml -version: '3.8' services: portainer: @@ -92,8 +91,6 @@ This image supports the use of Docker secrets to import from files and keep sens You can set any environment variable from a file by appending `__FILE` (double-underscore FILE) to the environmental variable name. ```yml -version: '3.8' - secrets: # Secrets are single-line text files where the sole content is the secret # Paths in this example assume that secrets are kept in local folder called ".secrets" diff --git a/docs/src/setup/index.md b/docs/src/setup/index.md index ee8e990..0b5d69d 100644 --- a/docs/src/setup/index.md +++ b/docs/src/setup/index.md @@ -9,7 +9,6 @@ outline: deep Create a `docker-compose.yml` file: ```yml -version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' @@ -55,7 +54,6 @@ are going to use. Here is an example of what your `docker-compose.yml` will look like when using a MariaDB container: ```yml -version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' diff --git a/frontend/js/app/dashboard/main.js b/frontend/js/app/dashboard/main.js index c2e82f8..4765d06 100644 --- a/frontend/js/app/dashboard/main.js +++ b/frontend/js/app/dashboard/main.js @@ -50,8 +50,7 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - if (typeof view.stats.hosts === 'undefined') { - Api.Reports.getHostStats() + Api.Reports.getHostStats() .then(response => { if (!view.isDestroyed()) { view.stats.hosts = response; @@ -61,7 +60,6 @@ module.exports = Mn.View.extend({ .catch(err => { console.log(err); }); - } }, /** diff --git a/frontend/js/app/nginx/access/list/item.ejs b/frontend/js/app/nginx/access/list/item.ejs index 2ee37a5..fe043c9 100644 --- a/frontend/js/app/nginx/access/list/item.ejs +++ b/frontend/js/app/nginx/access/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/nginx/certificates/list/item.ejs b/frontend/js/app/nginx/certificates/list/item.ejs index 20d6f23..9a0d6b2 100644 --- a/frontend/js/app/nginx/certificates/list/item.ejs +++ b/frontend/js/app/nginx/certificates/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/nginx/dead/list/item.ejs b/frontend/js/app/nginx/dead/list/item.ejs index d447bd1..dede3b6 100644 --- a/frontend/js/app/nginx/dead/list/item.ejs +++ b/frontend/js/app/nginx/dead/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/nginx/proxy/list/item.ejs b/frontend/js/app/nginx/proxy/list/item.ejs index a593680..3eeaa6d 100644 --- a/frontend/js/app/nginx/proxy/list/item.ejs +++ b/frontend/js/app/nginx/proxy/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/nginx/redirection/list/item.ejs b/frontend/js/app/nginx/redirection/list/item.ejs index 4f25d97..dff186f 100644 --- a/frontend/js/app/nginx/redirection/list/item.ejs +++ b/frontend/js/app/nginx/redirection/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/nginx/stream/list/item.ejs b/frontend/js/app/nginx/stream/list/item.ejs index a8ff83d..2b4cb62 100644 --- a/frontend/js/app/nginx/stream/list/item.ejs +++ b/frontend/js/app/nginx/stream/list/item.ejs @@ -1,6 +1,6 @@ -
- +
+
diff --git a/frontend/js/app/user/form.ejs b/frontend/js/app/user/form.ejs index aeb268f..9ba8443 100644 --- a/frontend/js/app/user/form.ejs +++ b/frontend/js/app/user/form.ejs @@ -1,10 +1,10 @@