prevent anonymous names & add history links to terms/privacy

main
aria 1 year ago
parent 026a7a96a6
commit 3c1cd3d075

@ -20,14 +20,18 @@ We use the data specified:
- To show who uploaded which file
- To help moderate our service
Files set to "unlisted" is only available to those you send the link to, and moderators of files.gay.
Files set to "unlisted" are only available to those you send the link to, and moderators of files.gay.
Files set to "public" is viewable to anyone who visits your files.gay profile.
Files set to "public" are viewable to anyone who visits your files.gay profile.
Data is not shared with anyone besides moderators of git.gay and is not sold to anyone.
This website also does not use any CDN and is reverse proxied via Nginx.
## How we store this data
We store any data stored in a **MongoDB database** on an Ubuntu VPS hosted by [Letbox](https://letbox.com/).
This VPS is hosted in Seattle, Washington.
This VPS is hosted in Seattle, Washington.
You can view a history of this file [here](https://git.gay/a/media-host/commits/branch/main/articles/examples/privacy.example.md).

@ -18,4 +18,6 @@ You must not submit anything illegal in the United States of America. This will
## NSFW & NSFL content
You must not publicly host NSFW and NSFL (including "shock content") content on our servers without warning. Either have a warning or don't post it at all.
You must not publicly host NSFW and NSFL (including "shock content") content on our servers without warning. Either have a warning or don't post it at all.
You can view a history of this file [here](https://git.gay/a/media-host/commits/branch/main/articles/examples/terms.example.md).

@ -78,7 +78,7 @@ app.post("/register", async function(req, res) {
if (zx.score >= 2.5) {
let p = bcrypt.hashSync(fields.password, 10);
let a = await collection.findOne({username: fields.username, password: p});
if (a !== null) {
if (a !== null && fields.username !== "Anonymous") {
res.render("pages/register", {config: config, err: "Account already exists with that username."});
} else {
let n = await collection.insertOne({username: fields.username, password: p, id: utils.generateString(10)});
@ -135,7 +135,7 @@ app.post("/signup-with-code", async function(req, res) {
if (zx.score >= 2.5) {
let p = bcrypt.hashSync(fields.password, 10);
let a = await collection.findOne({username: fields.username});
if (a !== null) {
if (a !== null && fields.username !== "Anonymous") {
res.render("pages/signup-code", {config: config, err: "Account already exists with that username.", code: req.query.code});
} else {
let code = await signup.findOne({code: fields["signup-code"]});
@ -373,7 +373,7 @@ app.get(["/f/:id/*", "/f/:id"], async function(req, res) {
let fn = file.direct.split("/")[file.direct.split("/").length - 1];
let accName = (await accs.findOne({id: file.uploader}));
if (accName == null) {
accName = "Unknown";
accName = "Anonymous";
} else {
accName = accName.username;
}
@ -645,7 +645,7 @@ app.post("/admin/make", async function(req, res) {
if (zx.score >= 2.5) {
let p = bcrypt.hashSync(fields.password, 10);
var a = await collection.findOne({username: fields.username});
if (a !== null) {
if (a !== null && fields.username !== "Anonymous") {
res.render("pages/admin-actions/make-acc", {config: config, err: "Account already exists with that username.", account: acc});
} else {
let ac = {username: fields.username, password: p, id: utils.generateString(10)}