diff --git a/app.js b/app.js index f3ed756b08f43e2b00d9a2ba38528dca12308b2f..68d3e9442d8290a20f6bded553c389810031c0ac 100644 --- a/app.js +++ b/app.js @@ -8,6 +8,8 @@ const bodyParser = require('body-parser'); const session = require('express-session'); const errorhandler = require('errorhandler'); const flash = require('express-flash'); +const fileUpload = require('express-fileupload'); + const i18n = require('i18n'); // internationalization i18n.configure({ locales:['de', 'en'], @@ -22,12 +24,20 @@ var app = express(); app.set('port', config.app.port); app.set('views', __dirname + '/views'); app.set('view engine', 'pug'); + +// enable files upload +app.use(fileUpload({ + createParentPath: true, + limits: { + fileSize: 1000000 // 1 MB max. file size + } +})); + app.use(morgan('combined')); app.use(cookieParser()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: false})); app.use(express.static(path.join(__dirname, 'public'))); - app.use(i18n.init); app.use((req, res, next) => { res.setLocale('de'); diff --git a/config/config.js b/config/config.js index 5c0c2cfc56bd3d8e619413a1928de3eac06e9c9f..b1345231cc940921d2964fa22deb70cbcb569240 100644 --- a/config/config.js +++ b/config/config.js @@ -9,8 +9,8 @@ module.exports = { saml: { path: process.env.SAML_PATH || '/saml/SSO', entryPoint: process.env.SAML_ENTRY_POINT || 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SSOService.php', - //issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata - issuer: 'sp-account-testing.m4lab.hft-stuttgart.de', //testing metadata + issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata + //issuer: 'sp-account-testing.m4lab.hft-stuttgart.de', //testing metadata //issuer: 'sp-account-prod.m4lab.hft-stuttgart.de', //production metadata logoutUrl: 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php' } @@ -22,6 +22,7 @@ module.exports = { port: 3306, // MySQL port dbUser: 'userdb', // User DB host_project: 'm4lab.hft-stuttgart.de', // DB host project db + //host_project: 'localhost', // local dbProject: 'projectDB' // Project DB }, mailer: { diff --git a/package-lock.json b/package-lock.json index 1d68e8a53382d986c1ce142141d82f6da46cbc04..8def620529bb811a0d3e89dcac0b8c7aa8a42574 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,12 +7,12 @@ "@types/babel-types": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz", - "integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==" + "integrity": "sha1-Zn6xZA6AOUNgKAVXN9K5mG7jNuM=" }, "@types/babylon": { "version": "6.16.5", "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz", - "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==", + "integrity": "sha1-HFZB22nrjN83jt0ltL53VL7rSLQ=", "requires": { "@types/babel-types": "*" } @@ -20,12 +20,12 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", "requires": { "mime-types": "~2.1.24", "negotiator": "0.6.2" @@ -57,7 +57,7 @@ "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "requires": { "color-convert": "^1.9.0" } @@ -65,7 +65,7 @@ "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=", "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -111,7 +111,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=" }, "balanced-match": { "version": "1.0.0", @@ -121,7 +121,7 @@ "basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "integrity": "sha1-uZgnm/R844NEtPPPkW1Gebv1Hjo=", "requires": { "safe-buffer": "5.1.2" } @@ -139,12 +139,12 @@ "binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" + "integrity": "sha1-I8DfFPaogHf1+YbA0WfsA8PVU3w=" }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "integrity": "sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=", "requires": { "bytes": "3.1.0", "content-type": "~1.0.4", @@ -161,7 +161,7 @@ "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "integrity": "sha1-VcbDmouljZxhrSLNh3Uy3rZlogs=", "requires": { "ansi-align": "^2.0.0", "camelcase": "^4.0.0", @@ -182,7 +182,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -191,15 +191,23 @@ "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", "requires": { "fill-range": "^7.0.1" } }, + "busboy": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.3.1.tgz", + "integrity": "sha512-y7tTxhGKXcyBxRKAni+awqx8uqaJKrSFSNFSeRG5CsWNdmy2BIK+6VGWEW7TZnIO/533mtMEA4rOevQV815YJw==", + "requires": { + "dicer": "0.3.0" + } + }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=" }, "camelcase": { "version": "1.2.1", @@ -209,7 +217,7 @@ "capture-stack-trace": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==" + "integrity": "sha1-psC74fOPOqC5Ijjstv9Cw0TUE10=" }, "center-align": { "version": "0.1.3", @@ -223,7 +231,7 @@ "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -248,7 +256,7 @@ "ci-info": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" + "integrity": "sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=" }, "cli-boxes": { "version": "1.0.0", @@ -275,7 +283,7 @@ "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", "requires": { "color-name": "1.1.3" } @@ -293,7 +301,7 @@ "configstore": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "integrity": "sha1-xvJd767vJt8S3TNBSwAf6BpUP48=", "requires": { "dot-prop": "^4.1.0", "graceful-fs": "^4.1.2", @@ -311,7 +319,7 @@ "constantinople": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", - "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", + "integrity": "sha1-1F7XJPV9PRBQABen06iJwTga5kc=", "requires": { "@types/babel-types": "^7.0.0", "@types/babylon": "^6.16.2", @@ -322,7 +330,7 @@ "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "integrity": "sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=", "requires": { "safe-buffer": "5.1.2" } @@ -330,7 +338,7 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=" }, "cookie": { "version": "0.3.1", @@ -382,7 +390,7 @@ "crypto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", - "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==" + "integrity": "sha1-KvG3ytgXXSTIobB3glV5SiGAMDc=" }, "crypto-random-string": { "version": "1.0.0", @@ -392,7 +400,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "requires": { "ms": "2.0.0" }, @@ -412,7 +420,7 @@ "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + "integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=" }, "define-properties": { "version": "1.1.3", @@ -432,6 +440,14 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "dicer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz", + "integrity": "sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==", + "requires": { + "streamsearch": "0.1.2" + } + }, "doctypes": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", @@ -440,7 +456,7 @@ "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=", "requires": { "is-obj": "^1.0.0" } @@ -514,7 +530,7 @@ "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=" }, "etag": { "version": "1.8.1", @@ -538,7 +554,7 @@ "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "integrity": "sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=", "requires": { "accepts": "~1.3.7", "array-flatten": "1.1.1", @@ -575,10 +591,18 @@ "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=" } } }, + "express-fileupload": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/express-fileupload/-/express-fileupload-1.1.6.tgz", + "integrity": "sha512-w24zPWT8DkoIxSVkbxYPo9hkTiLpCQQzNsLRTCnecBhfbYv+IkIC5uLw2MIUAxBZ+7UMmXPjGxlhzUXo4RcbZw==", + "requires": { + "busboy": "^0.3.1" + } + }, "express-flash": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/express-flash/-/express-flash-0.0.2.tgz", @@ -590,7 +614,7 @@ "express-session": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.0.tgz", - "integrity": "sha512-t4oX2z7uoSqATbMfsxWMbNjAL0T5zpvcJCk3Z9wnPPN7ibddhnmDZXHfEcoBMG2ojKXZoCyPMc5FbtK+G7SoDg==", + "integrity": "sha1-m1DbteigPDU3NoE48HJzYVC3+bM=", "requires": { "cookie": "0.4.0", "cookie-signature": "1.0.6", @@ -605,24 +629,24 @@ "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=" }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + "integrity": "sha1-tpYWPMdXVg0JzyLMj60Vcbeedt8=" }, "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk=" } } }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", "requires": { "to-regex-range": "^5.0.1" } @@ -630,7 +654,7 @@ "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -665,7 +689,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" }, "get-stream": { "version": "3.0.0", @@ -675,7 +699,7 @@ "glob-parent": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "integrity": "sha1-X0wdHnSNMM1zrSlEs1d6gbCB6MI=", "requires": { "is-glob": "^4.0.1" } @@ -709,12 +733,12 @@ "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + "integrity": "sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM=" }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", "requires": { "function-bind": "^1.1.1" } @@ -732,7 +756,7 @@ "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "integrity": "sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=", "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -764,7 +788,7 @@ "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -787,7 +811,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=" }, "ipaddr.js": { "version": "1.9.0", @@ -797,7 +821,7 @@ "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", "requires": { "binary-extensions": "^2.0.0" } @@ -805,7 +829,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" }, "is-callable": { "version": "1.1.4", @@ -815,7 +839,7 @@ "is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "integrity": "sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw=", "requires": { "ci-info": "^1.5.0" } @@ -854,7 +878,7 @@ "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", "requires": { "is-extglob": "^2.1.1" } @@ -876,7 +900,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=" }, "is-obj": { "version": "1.0.1", @@ -912,7 +936,7 @@ "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=" }, "is-stream": { "version": "1.1.0", @@ -966,7 +990,7 @@ "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=" }, "longest": { "version": "1.0.1", @@ -976,12 +1000,12 @@ "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + "integrity": "sha1-b54wtHCE2XGnyCD/FabFFnt0wm8=" }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" @@ -990,7 +1014,7 @@ "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", "requires": { "pify": "^3.0.0" } @@ -1003,7 +1027,7 @@ "math-interval-parser": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/math-interval-parser/-/math-interval-parser-2.0.1.tgz", - "integrity": "sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==" + "integrity": "sha1-4izW0VoKf0wDrsVg23ZRPaYVvtQ=" }, "media-typer": { "version": "0.3.0", @@ -1018,7 +1042,7 @@ "messageformat": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz", - "integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==", + "integrity": "sha1-3iY8SQKdXq5l1+4l4HVPV/QlrZE=", "requires": { "make-plural": "^4.3.0", "messageformat-formatters": "^2.0.1", @@ -1028,7 +1052,7 @@ "make-plural": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz", - "integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==", + "integrity": "sha1-8j3gjv2wysLgybqfMVsN/2tMJzU=", "requires": { "minimist": "^1.2.0" } @@ -1038,12 +1062,12 @@ "messageformat-formatters": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz", - "integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==" + "integrity": "sha1-BJLBQCpId191HJsXwDVOkr4BKwg=" }, "messageformat-parser": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.2.tgz", - "integrity": "sha512-7dWuifeyldz7vhEuL96Kwq1fhZXBW+TUfbnHN4UCrCxoXQTYjHnR78eI66Gk9LaLLsAvzPNVJBaa66DRfFNaiA==" + "integrity": "sha1-/TTsOZEqFIaKFZXq63QkhauKs3I=" }, "methods": { "version": "1.1.2", @@ -1053,7 +1077,7 @@ "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=" }, "mime-db": { "version": "1.40.0", @@ -1071,7 +1095,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "^1.1.7" } @@ -1084,7 +1108,7 @@ "morgan": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", - "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "integrity": "sha1-Co0Wc0odmvvIJLmd+H5zjlji2lk=", "requires": { "basic-auth": "~2.0.0", "debug": "2.6.9", @@ -1117,12 +1141,12 @@ "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=" }, "node-forge": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", - "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" + "integrity": "sha1-/fO0GK7h+U8O9kLNY0hsd8qXJKw=" }, "nodemailer": { "version": "6.3.1", @@ -1149,7 +1173,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", "requires": { "ms": "^2.1.1" } @@ -1167,7 +1191,7 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=" }, "npm-run-path": { "version": "2.0.2", @@ -1212,7 +1236,7 @@ "on-headers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=" }, "p-finally": { "version": "1.0.0", @@ -1233,7 +1257,7 @@ "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=" }, "passport": { "version": "0.3.2", @@ -1262,7 +1286,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", "requires": { "ms": "^2.1.1" } @@ -1287,7 +1311,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=" }, "path-to-regexp": { "version": "0.1.7", @@ -1317,7 +1341,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=" }, "proxy-addr": { "version": "2.0.5", @@ -1336,12 +1360,12 @@ "pstree.remy": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.7.tgz", - "integrity": "sha512-xsMgrUwRpuGskEzBFkH8NmTimbZ5PcPup0LA8JJkHIm2IMUbQcpo3yeLNWVrufEYjh8YwtSVh0xz6UeWc5Oh5A==" + "integrity": "sha1-x2ljooBH7WFULcNhqibuVaf6FfM=" }, "pug": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.4.tgz", - "integrity": "sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==", + "integrity": "sha1-7naC7ApgSUs41IqI8F87CskxN30=", "requires": { "pug-code-gen": "^2.0.2", "pug-filters": "^3.1.1", @@ -1356,7 +1380,7 @@ "pug-attrs": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz", - "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==", + "integrity": "sha1-svRMQ55OtK1dTvJcrCDRitKMwzY=", "requires": { "constantinople": "^3.0.1", "js-stringify": "^1.0.1", @@ -1366,7 +1390,7 @@ "pug-code-gen": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.2.tgz", - "integrity": "sha512-kROFWv/AHx/9CRgoGJeRSm+4mLWchbgpRzTEn8XCiwwOy6Vh0gAClS8Vh5TEJ9DBjaP8wCjS3J6HKsEsYdvaCw==", + "integrity": "sha1-rQlnFirqB33PeHg42U7RSssCF8I=", "requires": { "constantinople": "^3.1.2", "doctypes": "^1.1.0", @@ -1423,12 +1447,12 @@ "pug-error": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz", - "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==" + "integrity": "sha1-80L7AIdS1YA0wYXeA2At2f/hX6Y=" }, "pug-filters": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-3.1.1.tgz", - "integrity": "sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==", + "integrity": "sha1-qyzILbnuzPV4vaiRMOJSoNsCaqc=", "requires": { "clean-css": "^4.1.11", "constantinople": "^3.0.1", @@ -1479,7 +1503,7 @@ "pug-lexer": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-4.1.0.tgz", - "integrity": "sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==", + "integrity": "sha1-UxzeSMfAsfy7wrhUhchmXjFInP0=", "requires": { "character-parser": "^2.1.1", "is-expression": "^3.0.0", @@ -1499,7 +1523,7 @@ "pug-linker": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.6.tgz", - "integrity": "sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==", + "integrity": "sha1-9b8hiw79Zc5mcPevxRZY0Pgpifs=", "requires": { "pug-error": "^1.3.3", "pug-walk": "^1.1.8" @@ -1508,7 +1532,7 @@ "pug-load": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz", - "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==", + "integrity": "sha1-04yF64X24vcE3qFNzKlBRNNdPns=", "requires": { "object-assign": "^4.1.0", "pug-walk": "^1.1.8" @@ -1517,7 +1541,7 @@ "pug-parser": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-5.0.1.tgz", - "integrity": "sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==", + "integrity": "sha1-A+etpItoQL04Ivhn19kPhC0P/ck=", "requires": { "pug-error": "^1.3.3", "token-stream": "0.0.1" @@ -1526,12 +1550,12 @@ "pug-runtime": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz", - "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==" + "integrity": "sha1-baeXbDa/IvaOczw1kkDYrnoylTo=" }, "pug-strip-comments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz", - "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==", + "integrity": "sha1-zBtt4fbo9ZMc8C7GbN/9P1Dq+Kg=", "requires": { "pug-error": "^1.3.3" } @@ -1539,7 +1563,7 @@ "pug-walk": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", - "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==" + "integrity": "sha1-tAj2fyeRL4wh2i9FtyMMS9Kl6no=" }, "q": { "version": "1.5.1", @@ -1549,7 +1573,7 @@ "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=" }, "random-bytes": { "version": "1.0.0", @@ -1559,12 +1583,12 @@ "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=" }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "integrity": "sha1-oc5vucm8NWylLoklarWQWeE9AzI=", "requires": { "bytes": "3.1.0", "http-errors": "1.7.2", @@ -1575,7 +1599,7 @@ "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=", "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -1615,12 +1639,12 @@ "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" }, "registry-auth-token": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "integrity": "sha1-10RoFUM/XV7WQxzV3KIQSPZrOX4=", "requires": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" @@ -1658,22 +1682,22 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=" }, "semver-diff": { "version": "2.1.0", @@ -1686,7 +1710,7 @@ "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -1706,14 +1730,14 @@ "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=" } } }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -1724,7 +1748,7 @@ "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=" }, "shebang-command": { "version": "1.2.0", @@ -1747,7 +1771,7 @@ "sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + "integrity": "sha1-2hdlJiv4wPVxdJ8q1sJjACB65nM=" }, "sqlstring": { "version": "2.3.1", @@ -1759,10 +1783,15 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -1789,7 +1818,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "requires": { "safe-buffer": "~5.1.0" } @@ -1815,7 +1844,7 @@ "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", "requires": { "has-flag": "^3.0.0" } @@ -1841,7 +1870,7 @@ "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", "requires": { "is-number": "^7.0.0" } @@ -1849,7 +1878,7 @@ "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=" }, "token-stream": { "version": "0.0.1", @@ -1859,7 +1888,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", "requires": { "nopt": "~1.0.10" } @@ -1867,7 +1896,7 @@ "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -1899,7 +1928,7 @@ "uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", - "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "integrity": "sha1-Kz1cckDo/C5Y+Komnl7knAhXvTo=", "requires": { "random-bytes": "~1.0.0" } @@ -1933,7 +1962,7 @@ "update-notifier": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "integrity": "sha1-0HRFk+E/Fh5AassdlAi3LK0Ir/Y=", "requires": { "boxen": "^1.2.1", "chalk": "^2.0.1", @@ -1987,7 +2016,7 @@ "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", "requires": { "isexe": "^2.0.0" } @@ -1995,7 +2024,7 @@ "widest-line": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "integrity": "sha1-dDh2RzDsfvQ4HOTfgvuYpTFCo/w=", "requires": { "string-width": "^2.1.1" } @@ -2008,7 +2037,7 @@ "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "integrity": "sha1-H9Lprh3z51uNjDZ0Q8aS1MqB9IE=", "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", @@ -2023,7 +2052,7 @@ "xml-crypto": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-1.4.0.tgz", - "integrity": "sha512-K8FRdRxICVulK4WhiTUcJrRyAIJFPVOqxfurA3x/JlmXBTxy+SkEENF6GeRt7p/rB6WSOUS9g0gXNQw5n+407g==", + "integrity": "sha1-3hzsjNMcvWic2Q09boon1K6Afec=", "requires": { "xmldom": "0.1.27", "xpath": "0.0.27" @@ -2064,7 +2093,7 @@ "xmlbuilder": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + "integrity": "sha1-vpuuHIoEbnazESdyY0fQrXACvrM=" }, "xmldom": { "version": "0.1.27", @@ -2074,7 +2103,7 @@ "xpath": { "version": "0.0.27", "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", - "integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" + "integrity": "sha1-3TQh+9zFZGrDLEhTG01+nQws+pI=" }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index 2c3a256225dfdd55c4ad54c364b6e4d650af6004..2df854950e08a3f9e37eb6ff7ff44b94f786b621 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "crypto": "^1.0.1", "errorhandler": "1.4.3", "express": "^4.17.1", + "express-fileupload": "^1.1.6", "express-flash": "0.0.2", "express-session": "^1.17.0", "fs": "0.0.1-security", diff --git a/routes/routes-account.js b/routes/routes-account.js index e63438162f3874cd49b853e1cd3fe8c84d7f2c3e..39fb86eb3efd5c089de7139140af633ef88209ac 100644 --- a/routes/routes-account.js +++ b/routes/routes-account.js @@ -62,12 +62,12 @@ module.exports = function (app, config, passport, i18n) { failureFlash: true }), function (req, res) { - res.redirect('/account/'); + res.redirect('/'); } ); // to generate Service Provider's XML metadata - app.get('/saml/metadata', + app.get('/saml/metadata', function(req, res) { res.type('application/xml'); var spMetadata = samlStrategy.generateServiceProviderMetadata(fs.readFileSync(__dirname + '/cert/cert.pem', 'utf8')); @@ -104,8 +104,8 @@ module.exports = function (app, config, passport, i18n) { } }) } else { - res.redirect('/account/login'); // localhost - } + res.redirect('/login'); // localhost + } }); app.get('/login', @@ -118,14 +118,14 @@ module.exports = function (app, config, passport, i18n) { app.get('/logout', function (req, res) { if (req.user == null) { - return res.redirect('/account/'); + return res.redirect('/'); } req.user.nameID = req.user.id; req.user.nameIDFormat = req.user.idFormat; return samlStrategy.logout(req, function(err, uri) { req.logout(); - + if ( req.session ) { req.session.destroy((err) => { if(err) { @@ -133,7 +133,7 @@ module.exports = function (app, config, passport, i18n) { } }); } - + return res.redirect(uri); }); }); @@ -149,7 +149,7 @@ module.exports = function (app, config, passport, i18n) { } }) } else { - res.redirect('/account/login'); + res.redirect('/login'); } }); @@ -183,7 +183,7 @@ module.exports = function (app, config, passport, i18n) { // create JSON object of projects and user status for front-end function(userProjects, projectsOverview, done) { var allProjects = [] // JSON object - + var userProjectId = [] // array of user's project_id for (var i = 0; i < userProjects.length; i++) { userProjectId.push(userProjects[i].project_id) @@ -213,7 +213,7 @@ module.exports = function (app, config, passport, i18n) { } ]) } else { - res.redirect('/account/login'); + res.redirect('/login'); } }); @@ -223,7 +223,7 @@ module.exports = function (app, config, passport, i18n) { user: req.user // useful for view engine, useless for HTML }); } else { - res.redirect('/account/login'); + res.redirect('/login'); } }); @@ -238,7 +238,7 @@ module.exports = function (app, config, passport, i18n) { industry: req.body.inputIndustry, speciality: req.body.inputSpeciality, } - + if (req.isAuthenticated()) { if (userData.email) { dbconn.user.query('UPDATE user SET ? WHERE email = "' +userData.email+'"', userData, function (err, rows, fields) { @@ -250,14 +250,14 @@ module.exports = function (app, config, passport, i18n) { //req.flash('success', 'Profile updated!'); req.flash('success', 'Ihr Benutzerprofil wurde aktualisiert!'); } - res.redirect('/account/profile'); + res.redirect('/profile'); }) } } else { - res.redirect('/account/login'); + res.redirect('/login'); } }); - + app.post('/changePwd', function (req, res) { if (req.isAuthenticated()) { var currPwd = req.body.inputCurrPwd @@ -269,27 +269,32 @@ module.exports = function (app, config, passport, i18n) { // Load hashed passwd from DB dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) { if (err) { - res.redirect('/500') - throw err + console.error(err) + res.status(500).render(lang+'/500', { + error: err + }) } var userPwd = rows[0].password // check if the password is correct bcrypt.compare(currPwd, userPwd, function(err, isMatch) { if (err) { - res.redirect('/500') - throw err + console.error(err) + res.status(500).render(lang+'/500', { + error: err + }) } else if (!isMatch) { //req.flash('error', "Sorry, your password was incorrect. Please double-check your password.") req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.") //res.redirect('/security') - res.redirect('/account/security') + res.redirect('/security') } else { if ( newPwd != retypePwd ) { - req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.") - res.redirect('/account/security') + //req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.") + req.flash('error', 'Passwörter stimmen nicht überein. Bitte stellen Sie sicher, dass Sie das Passwort beide Male genau gleich eingeben.') + res.redirect('/security') } else { // update password @@ -318,19 +323,19 @@ module.exports = function (app, config, passport, i18n) { } }); } - res.redirect('/account/security') + res.redirect('/security') }) }); }); } } - }) + }) }) } - }) + }) } else { - res.redirect('/account/login'); + res.redirect('/login'); } }); @@ -348,7 +353,7 @@ module.exports = function (app, config, passport, i18n) { "we've received a request to reset your password. However, this email address is not on our database of registered users.\n\n"+ "Thanks,\nM4_LAB Team"; var emailSubject = "Account Access Attempted"; */ - + async.waterfall([ function(done) { crypto.randomBytes(20, function(err, buf) { @@ -406,7 +411,7 @@ module.exports = function (app, config, passport, i18n) { req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.'); } //res.redirect('/forgotPwd'); // deployment - res.redirect('/account/forgotPwd'); // localhost + res.redirect('/forgotPwd'); // localhost }); }); @@ -416,7 +421,7 @@ module.exports = function (app, config, passport, i18n) { //req.flash('error', 'Password reset token is invalid or has expired.'); req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.'); //res.redirect('/forgotPwd'); // deployment - res.redirect('/account/forgotPwd'); // localhost + res.redirect('/forgotPwd'); // localhost } else { res.render(lang+'/account/reset'); @@ -455,7 +460,7 @@ module.exports = function (app, config, passport, i18n) { } }); // redirect to login page - res.redirect('/account/login') + res.redirect('/login') } }) }); @@ -463,10 +468,10 @@ module.exports = function (app, config, passport, i18n) { } else { req.flash('error', "User not found.") - res.redirect('/account/login') + res.redirect('/login') } }); - + }); // todo: user registration with captcha @@ -507,9 +512,9 @@ module.exports = function (app, config, passport, i18n) { } else { //req.flash('success', 'Your account has been created. Please log in.') - req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.') + req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.') } - res.redirect('/account/registration'); + res.redirect('/registration'); }) }); }); diff --git a/routes/routes-project.js b/routes/routes-project.js index a85058ff18155ccb4347ce0d512e491da30d5d0a..00b2e0567ccac5be7fb99f702c0bf67b1129bffe 100644 --- a/routes/routes-project.js +++ b/routes/routes-project.js @@ -2,6 +2,8 @@ const methods = require('./methods') const async = require('async') const helpers = require('./helpers') +const pictSizeLimit = 1000000 // 1 MB + module.exports = function (app) { // ======== APP ROUTES - PROJECT ==================== @@ -104,7 +106,7 @@ module.exports = function (app) { res.render(lang+'/project/addProjectOverview') } else { - res.redirect('/account/login') + res.redirect('/login') } }) @@ -144,7 +146,7 @@ module.exports = function (app) { if (err) { //req.flash('error', "Failed") req.flash('error', "Fehlgeschlagen") - res.redirect('/account/addProjectOverview'); + res.redirect('/addProjectOverview'); } else { req.flash('success', 'Your project has been created.') @@ -160,13 +162,45 @@ module.exports = function (app) { if (req.body.wiki) wiki = 1 + var projectLogo = req.files.logo + var projectPicture = req.files.src + var projectLogoPath, projectPicturePath + + if (projectLogo) { + // raise error if size limit is exceeded + if (projectLogo.size === pictSizeLimit) { + req.flash('error', 'Projektlogo exceeds 1 MB'); + res.redirect('/addprojectoverview'); + } + else { + // TEST PATH FOR DEVELOPMENT (LOCALHOST) + projectLogoPath = './folder-in-server-to-save-projektlogo/'+req.body.pname+'/'+projectLogo.name + // PATH FOR TEST/LIVE SERVER + // var projectLogoPath = to-be-defined + } + } + if (projectPicture) { + // raise error if size limit is exceeded + if (projectPicture.size === pictSizeLimit) { + req.flash('error', 'Projektbild exceeds 1 MB'); + res.redirect('/addprojectoverview'); + } + else { + // TEST PATH FOR DEVELOPMENT (LOCALHOST) + projectPicturePath = './folder-in-server-to-save-projektbild/'+req.body.pname+'/'+projectPicture.name + // PATH FOR TEST/LIVE SERVER + // var projectPicturePath = to-be-defined + } + + } + var projectTerm = req.body.termForm + " - " + req.body.termTo var projectOverviewData = { pname: req.body.pname, title: req.body.title, onelinesummary: req.body.summary, category: req.body.category, - logo: req.body.logo, + logo: projectLogoPath, gitlab: req.body.gitlabURL, wiki: wiki, overview: req.body.overview, @@ -178,7 +212,7 @@ module.exports = function (app) { term: projectTerm, further_details: req.body.furtherDetails, website: req.body.website, - src: req.body.src, + src: projectPicturePath, caption: req.body.caption, contact_lastname: req.body.contactName, contact_email: req.body.contactEmail, @@ -186,6 +220,28 @@ module.exports = function (app) { leader_email: req.body.leaderEmail } + // save pictures + if (projectLogo) { + projectLogo.mv(projectLogoPath, function(err) { + if (err) { + console.error(err) + res.status(500).render(lang+'/500', { + error: err + }) + } + }); + } + if (projectPicture) { + projectPicture.mv(projectPicturePath, function(err) { + if (err) { + console.error(err) + res.status(500).render(lang+'/500', { + error: err + }) + } + }); + } + /* RS: Temporary solution while Project DB is still in early phase. When User DB and Project DB are integrated and quite stabil, this operation should be done in 1 transaction. */ @@ -224,7 +280,7 @@ module.exports = function (app) { if (err) { //req.flash('error', "Failed") req.flash('error', "Fehlgeschlagen") - res.redirect('/account/addProjectOverview'); + res.redirect('/addProjectOverview'); } else { req.flash('success', 'Your project has been created.') diff --git a/views/DE/account/home.pug b/views/DE/account/home.pug index dc4e1c83fb6e851c47dd4e86cc07792f1f05c2f9..5a19d9bc2e267b21414f62498700c2cfa65a6221 100644 --- a/views/DE/account/home.pug +++ b/views/DE/account/home.pug @@ -34,9 +34,9 @@ html(lang="de") h5 span #{user.firstname} #{user.lastname} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") - a(class="nav-link" href="/account/profile" aria-selected="true") Benutzerprofil - a(class="nav-link" href="/account/security" aria-selected="false") Sicherheitseinstellungen - a(class="nav-link" href="/account/services" aria-selected="false") Projekte und Dienste + a(class="nav-link" href="/profile" aria-selected="true") Benutzerprofil + a(class="nav-link" href="/security" aria-selected="false") Sicherheitseinstellungen + a(class="nav-link" href="/services" aria-selected="false") Projekte und Dienste a(class="nav-link" href="/logout" aria-selected="false") Logout div(class="col-sm-9") p content goes here diff --git a/views/DE/account/profile.pug b/views/DE/account/profile.pug index eba579b384e8e1667f795e742fe7366b29fd0c3b..999fc3c7dd72b035511a9683611f892ffbe46ff9 100644 --- a/views/DE/account/profile.pug +++ b/views/DE/account/profile.pug @@ -35,8 +35,8 @@ html(lang="de") span #{user.firstname} #{user.lastname} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") a(class="nav-link" href="#" aria-selected="true") Benutzerprofil - a(class="nav-link" href="/account/security" aria-selected="false") Sicherheitseinstellungen - a(class="nav-link" href="/account/services" aria-selected="false") Projekte und Dienste + a(class="nav-link" href="/security" aria-selected="false") Sicherheitseinstellungen + a(class="nav-link" href="/services" aria-selected="false") Projekte und Dienste a(class="nav-link" href="/logout" aria-selected="false") Logout div(class="col-sm-9") if successes @@ -47,7 +47,7 @@ html(lang="de") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form#profileForm(method="POST", action="/account/updateProfile") + form#profileForm(method="POST", action="/updateProfile") div(class="form-row") div(class='form-group col-md-2') label(for="title") Anrede diff --git a/views/DE/account/security.pug b/views/DE/account/security.pug index 7d81edee3e47dcb85db9c70cfa392b1e7591e61e..fde244aae036a39a3dabc9e4ebfe29b2fd5e1610 100644 --- a/views/DE/account/security.pug +++ b/views/DE/account/security.pug @@ -37,9 +37,9 @@ html(lang="de") h5 span #{user.firstName} #{user.lastName} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") - a(class="nav-link" href="/account/profile" aria-selected="true") Benutzerprofil + a(class="nav-link" href="/profile" aria-selected="true") Benutzerprofil a(class="nav-link" href="#" aria-selected="false") Sicherheitseinstellungen - a(class="nav-link" href="/account/services" aria-selected="false") Projekte und Dienste + a(class="nav-link" href="/services" aria-selected="false") Projekte und Dienste a(class="nav-link" href="/logout" aria-selected="false") Logout div(class="col-sm-9") if successes @@ -50,7 +50,7 @@ html(lang="de") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form(class="needs-validation", method="post", action="/account/changePwd" novalidate) + form(class="needs-validation", method="post", action="/changePwd" novalidate) div(class="form-group row") label(for="currPwd") Aktuelles Passwort input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required) diff --git a/views/DE/account/services.pug b/views/DE/account/services.pug index 525041ef0bc99e2b461d545eef822466dae4bb3f..38d109d09321a411dab8daadd02b71d8382e1edf 100644 --- a/views/DE/account/services.pug +++ b/views/DE/account/services.pug @@ -34,8 +34,8 @@ html(lang="de") h5 span #{user.firstName} #{user.lastName} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") - a(class="nav-link" href="/account/profile" aria-selected="true") Benutzerprofil - a(class="nav-link" href="/account/security" aria-selected="false") Sicherheitseinstellungen + a(class="nav-link" href="/profile" aria-selected="true") Benutzerprofil + a(class="nav-link" href="/security" aria-selected="false") Sicherheitseinstellungen a(class="nav-link" href="#" aria-selected="false") Projekte und Dienste a(class="nav-link" href="/logout" aria-selected="false") Logout div(class="col-sm-9") diff --git a/views/DE/project/addProjectOverview.pug b/views/DE/project/addProjectOverview.pug index 08a391713c561222dec2b9336e60137c3c12dcde..9ed2c76eb32fd4d1bb72984361500397047f4f88 100644 --- a/views/DE/project/addProjectOverview.pug +++ b/views/DE/project/addProjectOverview.pug @@ -43,12 +43,12 @@ html(lang="de") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form(method="POST") + form(method="POST" encType="multipart/form-data") div(class='form-row') div(class='form-group col-md-12') - input#inputPname(name="pname" class="form-control" type="text" placeholder="Projekttitel*" required) + input#inputPname(name="title" class="form-control" type="text" placeholder="Projekttitel*" required) div(class="form-group col-md-12") - input#inputTitle(name="title" class="form-control" type="text" placeholder="Akronym*" required) + input#inputTitle(name="pname" class="form-control" type="text" placeholder="Akronym*" required) div(class="form-group col-md-12") input#inputSummary(name="summary" class="form-control" type="text" placeholder="Kurzbeschreibung") div(class='form-group col-md-12') @@ -59,7 +59,10 @@ html(lang="de") option(value="Lehr Projekt") Lehr Projekt option(value="Transfer-projekt") Transfer-projekt div(class="form-group col-md-12") - input#inputLogo(name="logo" class="form-control" type="text" placeholder="Projektlogo, to be implemented: upload picture") + div(class='form-group row') + label(for="projectLogo" class="col-sm-3 col-form-label") Projektlogo (max. 1 MB) + div(class="col-md-9") + input#inputLogo(name="logo" class="form-control" type="file") div(class="form-group col-md-12") div(class="input-group mb-3") input#inputGitlabURL(name="gitlabURL" type="text" class="form-control" placeholder="M4_LAB GitLab Project URL, z.B. https://transfer.hft-stuttgart.de/gitlab/username/projectname") @@ -85,12 +88,11 @@ html(lang="de") div(class='form-group col-md-12') input#inputAnnouncement(name="announcement" class="form-control" type="text" rows="5" placeholder="Ausschreibung") div(class="form-group col-md-12") - div(class='form-row') - div(class="form-group col-md-2") -
Laufzeit
- div(class="form-group col-md-5") + div(class='form-group row') + label(for="projectLogo" class="col-sm-2 col-form-label") Laufzeit + div(class="col-md-5") input#inputTermFrom(name="termForm" class="form-control" type="text" placeholder="von (dd.mm.yyyy)") - div(class="form-group col-md-5") + div(class="col-md-5") input#inputTermTo(name="termTo" class="form-control" type="text" placeholder="bis (dd.mm.yyyy)") div(class='form-group col-md-12') textarea#inputFurtherDetails(name="furtherDetails" class="form-control" type="text" rows="5" placeholder="Weitere Informationen (bspw. Links zu Berichten)") @@ -99,7 +101,10 @@ html(lang="de") h5(class="mb-3 font-weight-bold") Bilder div(class='form-row') div(class="form-group col-md-12") - input#inputSrc(name="src" class="form-control" type="text" placeholder="To be implemented: upload picture") + div(class='form-group row') + label(for="projectPicture" class="col-sm-3 col-form-label") Projektbild (max. 1 MB) + div(class="col-md-9") + input#inputSrc(name="src" class="form-control" type="file") div(class="form-group col-md-12") input#inputCaption(name="caption" class="form-control" type="text" placeholder="Bildunterschrift/Bildquelle") h5(class="mb-3 font-weight-bold") Kontakt diff --git a/views/DE/project/project-simplified.pug b/views/DE/project/project-simplified.pug index 6dead87fc997ba03a27b908f3246c1fd91d9522d..b929c71ba6dbc3882b73bf485c65eec05a9c7f1c 100644 --- a/views/DE/project/project-simplified.pug +++ b/views/DE/project/project-simplified.pug @@ -7,35 +7,39 @@ html(lang="de") link(rel="stylesheet", type="text/css", href="https://transfer.hft-stuttgart.de/css/bootstrap/bootstrap.css") link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") style. - .collapse { - display: none; - } - .collapse.in { - display: block; - } - .collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition-timing-function: ease; - -o-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-transition-duration: .35s; - -o-transition-duration: .35s; - transition-duration: .35s; - -webkit-transition-property: height,visibility; - -o-transition-property: height,visibility; - transition-property: height,visibility; - } - .warning { - color: red; - font-size: 11px; - } + .help .card-title > a:before { + float: right !important; + content: "-"; + padding-right: 5px; + } + .help .card-title > a.collapsed:before { + float: right !important; + content: "+"; + } + .help h3 > a { + color: #8a348b; + text-decoration: none; + display: block; + } + .help a { + display: inline; + } + .help .card > .card-header { + color: #fff; + } + .card-title { + margin-bottom: 0.5rem; + margin-top: 0.5rem; + } + #infoicon { + color: #8a348b; + } body include project.html // jQuery + script(src="https://code.jquery.com/jquery-3.3.1.min.js") script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous") // Bootstrap @@ -44,4 +48,5 @@ html(lang="de") if isUserAuthenticated script(src="/js/headfootLogout.js") else - script(src="/js/headfoot.js") \ No newline at end of file + script(src="/js/headfoot.js") + diff --git a/views/DE/project/project.html b/views/DE/project/project.html index df461962e13ae4c15eb13caa79d5e4a948d96260..ac3137dfd812ef7ac44c25f10622a797cfaabfde 100644 --- a/views/DE/project/project.html +++ b/views/DE/project/project.html @@ -1,70 +1,128 @@ -Hinweis: Die Nutzeroberfläche von GitLab ist in Englisch.
+Hinweis: Die Nutzeroberfläche von GitLab ist in Englisch.
+- Dann klicken Sie auf diesen Link zu den Gitlab-Projekten um die Liste aller im Gitlab erfassten Projekte zu sehen. - Vor dort können Sie dann auf die einzelnen Projekte zugreifen. - Ein Anmelden am Portal ist dazu nicht nötig. -
- -- Wenn Sie dem Projekteigentümer eine Rückmeldung bzw. einen Fehler melden wollen, navigieren Sie im Gitlab zunächst zum entsprechenden Projekt. - Anschließend können Sie dann dort die Möglichkeit nutzen, ein neues "Issues" einzureichen. - Ein Anmelden am Portal ist dazu nicht nötig. -
-- Wenn Sie darüberhinaus beitragen wollen, befolgen Sie bitte folgende Schritte: -
-+ Dann klicken Sie auf diesen + Link zu den Gitlab-Projekten + die Liste aller im Gitlab erfassten Projekte zu sehen. Vor dort können Sie dann auf die einzelnen Projekte zugreifen. + Ein Anmelden am Portal ist dazu nicht nötig. +
++ Wenn Sie dem Projekteigentümer eine Rückmeldung bzw. einen Fehler melden wollen, navigieren Sie im Gitlab zunächst zum entsprechenden Projekt. + Anschließend können Sie dann dort die Möglichkeit nutzen, ein neues "Issues" einzureichen. + Ein Anmelden am Portal ist dazu nicht nötig. +
++ Wenn Sie darüberhinaus beitragen wollen, befolgen Sie bitte folgende Schritte: +
++ Vorraussetzung dazu ist, dass Sie aktives oder ehemaliges Mitglied der Hochschule für Technik sind, + d.h. eine (noch) gültige HFT-Emailadresse haben. Dann befolgen Sie bitte folgende Schritte: +
+
+ Melden Sie sich bitte im Portal an.
+
+ Sofern Sie noch nicht als Nutzer im Portal eingetragen sind, wird das System Sie durch die Registrierung leiten.
+
+ Zur Anmeldung bzw. Registrierung gelangen Sie entweder über das Menü am oberen Seitenrand oder durch Klicken auf diesen
+ Link zum Benutzerkonto.
+