aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-08-18 10:35:45 +0200
committerChocobozzz <me@florianbigard.com>2023-08-18 10:35:45 +0200
commit822872aacdd763988cb9e81cdcc3576178993b74 (patch)
tree6d44cda8ce24120f50cc98405acd5fdc0e9a88ef
parent3ff44b67eaf8e2cae2cee1880dab3217e339a8e1 (diff)
downloadPeerTube-822872aacdd763988cb9e81cdcc3576178993b74.tar.gz
PeerTube-822872aacdd763988cb9e81cdcc3576178993b74.tar.zst
PeerTube-822872aacdd763988cb9e81cdcc3576178993b74.zip
Don't display admin email in security.txt
-rw-r--r--config/default.yaml5
-rw-r--r--config/production.yaml.example5
-rw-r--r--server/server/controllers/well-known.ts2
-rw-r--r--server/server/initializers/config.ts3
4 files changed, 8 insertions, 7 deletions
diff --git a/config/default.yaml b/config/default.yaml
index fcd634d1d..2a0b0fb1c 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -760,8 +760,9 @@ instance:
760 Disallow: 760 Disallow:
761 # /.well-known/security.txt rules. This endpoint is cached, so you may have to wait a few hours before viewing your changes 761 # /.well-known/security.txt rules. This endpoint is cached, so you may have to wait a few hours before viewing your changes
762 # To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string 762 # To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string
763 securitytxt: 763 securitytxt: |
764 '# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:' 764 Contact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md
765 Expires: 2025-12-31T11:00:00.000Z'
765 766
766services: 767services:
767 # Cards configuration to format video in Twitter 768 # Cards configuration to format video in Twitter
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 2ec7c3fca..5a7f378c4 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -770,8 +770,9 @@ instance:
770 Disallow: 770 Disallow:
771 # /.well-known/security.txt rules. This endpoint is cached, so you may have to wait a few hours before viewing your changes 771 # /.well-known/security.txt rules. This endpoint is cached, so you may have to wait a few hours before viewing your changes
772 # To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string 772 # To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string
773 securitytxt: 773 securitytxt: |
774 '# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:' 774 Contact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md
775 Expires: 2025-12-31T11:00:00.000Z'
775 776
776services: 777services:
777 # Cards configuration to format video in Twitter 778 # Cards configuration to format video in Twitter
diff --git a/server/server/controllers/well-known.ts b/server/server/controllers/well-known.ts
index b6bcd79ef..e820c060e 100644
--- a/server/server/controllers/well-known.ts
+++ b/server/server/controllers/well-known.ts
@@ -27,7 +27,7 @@ wellKnownRouter.get('/.well-known/security.txt',
27 cacheRoute(ROUTE_CACHE_LIFETIME.SECURITYTXT), 27 cacheRoute(ROUTE_CACHE_LIFETIME.SECURITYTXT),
28 (_, res: express.Response) => { 28 (_, res: express.Response) => {
29 res.type('text/plain') 29 res.type('text/plain')
30 return res.send(CONFIG.INSTANCE.SECURITYTXT + CONFIG.INSTANCE.SECURITYTXT_CONTACT) 30 return res.send(CONFIG.INSTANCE.SECURITYTXT)
31 } 31 }
32) 32)
33 33
diff --git a/server/server/initializers/config.ts b/server/server/initializers/config.ts
index dd196ea0c..690a20c31 100644
--- a/server/server/initializers/config.ts
+++ b/server/server/initializers/config.ts
@@ -546,8 +546,7 @@ const CONFIG = {
546 get CSS () { return config.get<string>('instance.customizations.css') } 546 get CSS () { return config.get<string>('instance.customizations.css') }
547 }, 547 },
548 get ROBOTS () { return config.get<string>('instance.robots') }, 548 get ROBOTS () { return config.get<string>('instance.robots') },
549 get SECURITYTXT () { return config.get<string>('instance.securitytxt') }, 549 get SECURITYTXT () { return config.get<string>('instance.securitytxt') }
550 get SECURITYTXT_CONTACT () { return config.get<string>('admin.email') }
551 }, 550 },
552 SERVICES: { 551 SERVICES: {
553 TWITTER: { 552 TWITTER: {