This commit is contained in:
Bryan Ashby 2023-01-02 16:55:36 -07:00
parent bc0f7690f8
commit 092acc0138
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
4 changed files with 8480 additions and 8489 deletions

View File

@ -22,6 +22,16 @@ exports.moduleInfo = {
packageName: 'codes.l33t.enigma.web.handler.finger', packageName: 'codes.l33t.enigma.web.handler.finger',
}; };
// :TODO: more info in default
const DefaultProfileTemplate = `
User information for: %USERNAME%
Real Name: %REAL_NAME%
Login Count: %LOGIN_COUNT%
Affiliations: %AFFILIATIONS%
Achievement Points: %ACHIEVEMENT_POINTS%
`;
// //
// WebFinger: https://www.rfc-editor.org/rfc/rfc7033 // WebFinger: https://www.rfc-editor.org/rfc/rfc7033
// //
@ -175,17 +185,7 @@ exports.getModule = class WebFingerServerModule extends WebHandlerModule {
); );
} }
// :TODO: more info in default return cb(DefaultProfileTemplate, 'text/plain');
return cb(
`
User information for: %USERNAME%
Real Name: %REAL_NAME%
Login Count: %LOGIN_COUNT%
Affiliations: %AFFILIATIONS%
Achievement Points: %ACHIEVEMENT_POINTS%`,
'text/plain'
);
} }
return cb(data, mimeTypes.contentType(paths.basename(templateFile))); return cb(data, mimeTypes.contentType(paths.basename(templateFile)));
}); });
@ -313,7 +313,10 @@ Achievement Points: %ACHIEVEMENT_POINTS%`,
} }
const accountStatus = user.getPropertyAsNumber(UserProps.AccountStatus); const accountStatus = user.getPropertyAsNumber(UserProps.AccountStatus);
if (User.AccountStatus.disabled == accountStatus || User.AccountStatus.inactive == accountStatus) { if (
User.AccountStatus.disabled == accountStatus ||
User.AccountStatus.inactive == accountStatus
) {
this._notFound(resp); this._notFound(resp);
return cb( return cb(
Errors.AccessDenied('Account disabled', ErrorReasons.Disabled) Errors.AccessDenied('Account disabled', ErrorReasons.Disabled)

13128
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +1,80 @@
{ {
"name": "enigma-bbs", "name": "enigma-bbs",
"version": "0.0.14-beta", "version": "0.0.14-beta",
"description": "ENiGMA½ Bulletin Board System", "description": "ENiGMA½ Bulletin Board System",
"author": "Bryan Ashby <bryan@l33t.codes>", "author": "Bryan Ashby <bryan@l33t.codes>",
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"bin": { "bin": {
"enigma-bbs": "./main.js", "enigma-bbs": "./main.js",
"oputil": "./oputil.js" "oputil": "./oputil.js"
}, },
"scripts": { "scripts": {
"start": "node main.js", "start": "node main.js",
"oputil": "node ./oputil.js", "oputil": "node ./oputil.js",
"pretty": "npx prettier --write ." "pretty": "npx prettier --write ."
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/NuSkooler/enigma-bbs.git" "url": "https://github.com/NuSkooler/enigma-bbs.git"
}, },
"homepage": "https://github.com/NuSkooler/enigma-bbs", "homepage": "https://github.com/NuSkooler/enigma-bbs",
"bugs": { "bugs": {
"url": "https://github.com/NuSkooler/enigma-bbs/issues" "url": "https://github.com/NuSkooler/enigma-bbs/issues"
}, },
"keywords": [ "keywords": [
"bbs", "bbs",
"telnet", "telnet",
"ssh", "ssh",
"retro" "retro"
], ],
"dependencies": { "dependencies": {
"@breejs/later": "4.1.0", "@breejs/later": "4.1.0",
"async": "3.2.4", "async": "3.2.4",
"binary-parser": "2.1.0", "binary-parser": "2.1.0",
"buffers": "github:NuSkooler/node-buffers", "buffers": "github:NuSkooler/node-buffers",
"bunyan": "1.8.15", "bunyan": "1.8.15",
"deepdash": "^5.3.9", "deepdash": "^5.3.9",
"easy-table": "^1.2.0", "easy-table": "^1.2.0",
"exiftool": "^0.0.3", "exiftool": "^0.0.3",
"fs-extra": "10.1.0", "fs-extra": "10.1.0",
"glob": "8.0.3", "glob": "8.0.3",
"graceful-fs": "^4.2.10", "graceful-fs": "^4.2.10",
"hashids": "^2.2.10", "hashids": "^2.2.10",
"hjson": "3.2.2", "hjson": "3.2.2",
"http-signature": "^1.3.6", "http-signature": "^1.3.6",
"iconv-lite": "0.6.3", "iconv-lite": "0.6.3",
"ini-config-parser": "^1.0.4", "ini-config-parser": "^1.0.4",
"inquirer": "^8.2.2", "inquirer": "^8.2.2",
"lodash": "4.17.21", "lodash": "4.17.21",
"lru-cache": "7.13.2", "lru-cache": "7.13.2",
"mime-types": "^2.1.35", "mime-types": "^2.1.35",
"minimist": "^1.2.6", "minimist": "^1.2.6",
"moment": "2.29.4", "moment": "2.29.4",
"nntp-server": "3.1.0", "nntp-server": "3.1.0",
"node-pty": "0.10.1", "node-pty": "0.10.1",
"nodemailer": "6.7.7", "nodemailer": "6.7.7",
"otplib": "11.0.1", "otplib": "11.0.1",
"qrcode-generator": "^1.4.4", "qrcode-generator": "^1.4.4",
"rlogin": "^1.0.0", "rlogin": "^1.0.0",
"sane": "5.0.1", "sane": "5.0.1",
"sanitize-filename": "^1.6.3", "sanitize-filename": "^1.6.3",
"sqlite3": "5.0.11", "sqlite3": "5.0.11",
"sqlite3-trans": "1.3.0", "sqlite3-trans": "1.3.0",
"ssh2": "1.11.0", "ssh2": "1.11.0",
"systeminformation": "5.12.3", "systeminformation": "5.12.3",
"telnet-socket": "0.2.4", "telnet-socket": "0.2.4",
"temptmp": "^1.1.0", "temptmp": "^1.1.0",
"uuid": "8.3.2", "uuid": "8.3.2",
"uuid-parse": "1.1.0", "uuid-parse": "1.1.0",
"ws": "7.5.9", "ws": "7.5.9",
"yazl": "^2.5.1" "yazl": "^2.5.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "8.21.0", "eslint": "8.21.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"prettier": "2.7.1" "prettier": "2.7.1"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
} }
} }

3658
yarn.lock

File diff suppressed because it is too large Load Diff