From 9cc67f45259e9bc5f9e7d20f861237039864c95d Mon Sep 17 00:00:00 2001
From: shadeofblue External Network Monitor
contribute certain information about his or her node and the usage of the
application to the external network monitor. If the user decides to opt-in
to contribute network statistics to the Company, the following information
- relating to the user’s use of the application (“External Statistics”) will
+ relating to the user's use of the application ("External Statistics") will
be transferred to the Company and published on
https://stats.golem.network/show:
The processing of the information by storing and publishing the External - Statistics on the external network monitor is based on the user’s consent + Statistics on the external network monitor is based on the user's consent pursuant to Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or her consent at any time. If the user wishes to end his or her contribution of External Statistics to the external network monitor, @@ -447,7 +447,7 @@
The processing of the information by storing the Internal Statistics on - the internal network monitor is based on the user’s consent pursuant to + the internal network monitor is based on the user's consent pursuant to Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or her consent at any time. If the user wishes to end his or her contribution of information to the network monitor, he or she can opt out by using the @@ -511,7 +511,7 @@
@@ -537,7 +537,7 @@
The processing of the information by storing the Error Information on the
- servers of the Company is based on the user’s consent pursuant to
+ servers of the Company is based on the user's consent pursuant to
Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or
her consent at any time. If the user wishes to end his or her contribution
of information to the network monitor, he or she can opt out by using the
diff --git a/tests/golem/test_terms.py b/tests/golem/test_terms.py
index 590edaba78..1833965ad6 100644
--- a/tests/golem/test_terms.py
+++ b/tests/golem/test_terms.py
@@ -1,4 +1,6 @@
import pathlib
+import re
+import unittest
from unittest.mock import patch
from faker import Faker
@@ -64,3 +66,31 @@ def test_show(self, read_mock):
"""
read_mock.return_value = content
self.assertEqual(self.terms.show(), content)
+
+
+class TermsOfUseContentsTest(unittest.TestCase):
+ def assertContentsValid(self, contents):
+ matched = re.search(
+ "(["
+ "^a-zA-Z0-9_"
+ "\\n\\<\\>\\/\\.\\:\\\"\\=\\x20\\(\\)\\,\\;\\'\\-\\%"
+ "])",
+ contents, flags=re.DOTALL)
+
+ try:
+ bad_char = matched.group(1)
+ except AttributeError:
+ bad_char = ''
+
+ self.assertFalse(
+ matched,
+ msg="Found unacceptable character {} ({})".format(
+ bad_char, bad_char.encode('utf-8').hex()
+ )
+ )
+
+ def test_tos_contents_valid(self):
+ self.assertContentsValid(terms.TermsOfUse.show())
+
+ def test_concent_tos_contents_valid(self):
+ self.assertContentsValid(terms.ConcentTermsOfUse.show())
From fa341aebcbfed475587878bd354b406b3f62d3a1 Mon Sep 17 00:00:00 2001
From: shadeofblue