[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Security file generator: remove email in security.txt file

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68cc64d7a3c50_2cdecec231f6@gitlab-sidekiq-low-urgency-cpu-bound-v2-78bd4bdcd4-jqr5t.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
bf842870 by Josaphat Imani at 2025-09-18T19:52:14+00:00
[FIX] Security file generator: remove email in security.txt file
---
* [FIX] Security file generator: remove email in security.txt file

See merge request tikiwiki/tiki!8392

- - - - -


1 changed file:

- lib/core/Tiki/Command/SecurityFileGenerateCommand.php


Changes:

=====================================
lib/core/Tiki/Command/SecurityFileGenerateCommand.php
=====================================
@@ -20,7 +20,6 @@ class SecurityFileGenerateCommand extends Command
 {
     private const CONTACTS = [
         'https://security.tiki.org/tiki-contact.php',
-        'mailto:[email protected]',
     ];
     private const ACKNOWLEDGEMENTS = [
         'https://tiki.org/article514',
@@ -76,10 +75,13 @@ class SecurityFileGenerateCommand extends Command
 
         $contacts = [];
         foreach ($input->getOption('admin-contact') as $contact) {
-            if (! preg_match('/^(tel|mailto):/', $contact)) {
-                $output->writeln("<error>Admin contact $contact must either start with tel: or mailto:</error>");
+            if (! preg_match('/^(tel:|mailto:|https?:\/\/)/', $contact)) {
+                $output->writeln("<error>Admin contact $contact must either start with tel:, mailto:, or http(s)://</error>");
                 return false;
             }
+            if (preg_match('/^mailto:/', $contact)) {
+                $output->writeln("<error>WARNING: Using email as contact may lead to spam.</error>");
+            }
             $contacts[] = $contact;
         }
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bf8428706bcd77f3a29485256b0a97674b5353e8

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bf8428706bcd77f3a29485256b0a97674b5353e8
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.