ios: Revise the iOS agreement somewhat.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2025-11-02 20:30:17 -05:00
parent 7879ab1d50
commit 687665cd6b
5 changed files with 33 additions and 128 deletions

View File

@@ -876,10 +876,6 @@ src/version.h : $(firstword $(MAKEFILE_LIST))
@echo "#define VERSION_NUMBER \"$(VERSION_NUMBER)\"" > $@ @echo "#define VERSION_NUMBER \"$(VERSION_NUMBER)\"" > $@
@echo "#define VERSION_NAME \"$(VERSION_NAME)\"" >> $@ @echo "#define VERSION_NAME \"$(VERSION_NAME)\"" >> $@
src/eula.h : core/eula.html
@echo "[xxd] $@"
@xxd -i -n k_eula $< $@
src/android/AndroidManifest.xml : $(firstword $(MAKEFILE_LIST)) src/android/AndroidManifest.xml : $(firstword $(MAKEFILE_LIST))
@echo "[android_version] $@" @echo "[android_version] $@"
@sed -i \ @sed -i \

View File

@@ -1,12 +1,12 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<title>Tilde Friends End User License Agreement</title> <title>Tilde Friends Usage Agreement</title>
<link type="text/css" rel="stylesheet" href="/static/w3.css" /> <link type="text/css" rel="stylesheet" href="/static/w3.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
</head> </head>
<body class="w3-content"> <body class="w3-container">
<h1>Tilde Friends End User License Agreement</h1> <h1>Tilde Friends Usage Agreement</h1>
<p> <p>
Tilde Friends is an app that enables communication with other users Tilde Friends is an app that enables communication with other users
through the through the
@@ -15,31 +15,27 @@
> >
protocol. protocol.
</p> </p>
<h2>You are responsible for your actions</h2> <h2>Your actions are your responsibility</h2>
<p> <p>
Apple tolerates no objectionable content or abusive users on their Apple tolerates no objectionable content or abusive users on their
platforms. platforms.
</p> </p>
<p> <p>
Your government, employer, family, friend group, etc. may impose You are responsible for your own actions within this app. You are
additional restrictions on acceptable behavior that you may be expected to responsible for complying with all applicable rules and laws.
follow.
</p>
<p>
You are solely responsible for your own actions within this app,
especially but not limited to what content you choose to post.
</p> </p>
<h2>You choose what you see</h2> <h2>You choose what you see</h2>
<p> <p>
You are in full control of the content you see in Tilde Friends by the You are in full control of the content you see in Tilde Friends. The
peers to which you choose to connect and the users you choose to follow. peers to which you choose to connect and the users you choose to follow
Initially you will be following no one with no connections and as a result directly determine the content presented to you. Initially you will be
see no content from other users. following no one with no connections and as a result see no user-generated
content.
</p> </p>
<p> <p>
If you find some content objectionable, you can filter it from your view If you encounter objectionable content, you can filter it from your view
by blocking the user who posted it. This also makes it so that users by blocking the user who posted it. This also makes it so that users
following you will not see it as a result of following you. following you will not see it as a consequence of following you.
</p> </p>
<p> <p>
The <code>admin</code> app contains a variety of settings that control the The <code>admin</code> app contains a variety of settings that control the
@@ -48,19 +44,22 @@
</p> </p>
<h2>This app is not a service</h2> <h2>This app is not a service</h2>
<p> <p>
This app relies on no official servers. The author of this app has no more Tilde Friends is an app. It relies on no servers. The author of this app
ability to see or filter what you post or read than any other user of the has no more ability to see or filter what you post or read than any other
network. user of the network.
</p> </p>
<p> <p>
If you believe objectionable content obtained from a service that is If you believe objectionable content obtained from a service that is
running as part of the Secure Scuttlebutt network should be flagged, look running as part of the Secure Scuttlebutt network should be flagged, report
for an email address contact for the service, generally by accessing the it to the operator of the service, generally by contacting the email address
server address in a web browser, and report it to the operator. listed when visiting the server address in a web browser.
</p> </p>
<h2>Agree with these terms?</h2> <h2>Agreement</h2>
<p>If you do not accept these terms, do not use this app.</p> <p>
<div class="w3-bar w3-center"> If you do not accept these terms, do not use this app. You may close and
delete it now.
</p>
<div class="w3-center w3-margin">
<a class="w3-button w3-blue" href="/eula/accept">Accept Agreement</a> <a class="w3-button w3-blue" href="/eula/accept">Accept Agreement</a>
</div> </div>
</body> </body>

View File

@@ -1,88 +0,0 @@
unsigned char k_eula[] = { 0x3c, 0x21, 0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65, 0x20, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x09, 0x3c,
0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x54, 0x69, 0x6c, 0x64, 0x65, 0x20, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x20,
0x45, 0x6e, 0x64, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x41, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x74,
0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22,
0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x69, 0x63, 0x2f, 0x77, 0x33, 0x2e, 0x63, 0x73, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76,
0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x3d, 0x31, 0x22, 0x20, 0x2f, 0x3e, 0x0a,
0x09, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x77, 0x33, 0x2d, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x31, 0x3e, 0x54, 0x69, 0x6c, 0x64, 0x65, 0x20, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x45, 0x6e,
0x64, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x41, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x68, 0x31, 0x3e,
0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x54, 0x69, 0x6c, 0x64, 0x65, 0x20, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e,
0x20, 0x61, 0x70, 0x70, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67,
0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x73, 0x73, 0x62,
0x63, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, 0x6f, 0x2f, 0x73, 0x63, 0x75, 0x74, 0x74, 0x6c, 0x65, 0x62, 0x75, 0x74, 0x74, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x2d, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2f, 0x22, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x3e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x53, 0x63, 0x75, 0x74, 0x74,
0x6c, 0x65, 0x62, 0x75, 0x74, 0x74, 0x3c, 0x2f, 0x61, 0x0a, 0x09, 0x09, 0x09, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x0a, 0x09,
0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x32, 0x3e, 0x59, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62,
0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70,
0x3e, 0x0a, 0x09, 0x09, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x62, 0x75, 0x73, 0x69, 0x76, 0x65, 0x20, 0x75,
0x73, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x0a, 0x09,
0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x59, 0x6f, 0x75, 0x72, 0x20, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e,
0x74, 0x2c, 0x20, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x2c, 0x20, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x2c, 0x20, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x20, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x2c, 0x20, 0x65, 0x74, 0x63, 0x2e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x61, 0x64, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65,
0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x0a, 0x09, 0x09, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70,
0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x59, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x6f, 0x6c, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c,
0x6c, 0x79, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x0a, 0x09, 0x09, 0x3c,
0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x32, 0x3e, 0x59, 0x6f, 0x75, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75,
0x20, 0x73, 0x65, 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x59, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x69, 0x6e,
0x20, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20,
0x79, 0x6f, 0x75, 0x20, 0x73, 0x65, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x54, 0x69, 0x6c, 0x64, 0x65, 0x20, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x62, 0x79, 0x20, 0x74,
0x68, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x65, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x68, 0x6f, 0x6f,
0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, 0x79,
0x6f, 0x75, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x09, 0x09, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x69,
0x61, 0x6c, 0x6c, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f,
0x20, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x0a, 0x09, 0x09, 0x09, 0x73, 0x65, 0x65, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c,
0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x74,
0x65, 0x72, 0x20, 0x69, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x76, 0x69, 0x65, 0x77, 0x0a, 0x09, 0x09, 0x09, 0x62, 0x79, 0x20, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x20, 0x69, 0x74,
0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x69, 0x74, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
0x75, 0x73, 0x65, 0x72, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e,
0x6f, 0x74, 0x20, 0x73, 0x65, 0x65, 0x20, 0x69, 0x74, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x6f, 0x6c, 0x6c,
0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x79, 0x6f, 0x75, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x54, 0x68,
0x65, 0x20, 0x3c, 0x63, 0x6f, 0x64, 0x65, 0x3e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x3c, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x3e, 0x20, 0x61, 0x70, 0x70, 0x20, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x68,
0x61, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x54, 0x69, 0x6c, 0x64, 0x65, 0x20, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20,
0x6d, 0x61, 0x6b, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65,
0x74, 0x68, 0x65, 0x72, 0x0a, 0x09, 0x09, 0x09, 0x74, 0x68, 0x65, 0x20, 0x61, 0x70, 0x70, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x63, 0x63,
0x65, 0x70, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61, 0x6c,
0x6c, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x32, 0x3e, 0x54, 0x68, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x20, 0x69, 0x73, 0x20, 0x6e,
0x6f, 0x74, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x54, 0x68,
0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x20, 0x72, 0x65, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x20,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x61,
0x70, 0x70, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20,
0x73, 0x65, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x20, 0x6f,
0x72, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x6f, 0x66,
0x20, 0x74, 0x68, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e,
0x0a, 0x09, 0x09, 0x09, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x20,
0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x53, 0x63, 0x75, 0x74, 0x74, 0x6c, 0x65, 0x62, 0x75, 0x74,
0x74, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x2c, 0x20,
0x6c, 0x6f, 0x6f, 0x6b, 0x0a, 0x09, 0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x77, 0x65, 0x62, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x2c,
0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x32, 0x3e, 0x41, 0x67, 0x72, 0x65, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
0x65, 0x73, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x3f, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64,
0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x64, 0x6f, 0x20,
0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x2e, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20,
0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x77, 0x33, 0x2d, 0x62, 0x61, 0x72, 0x20, 0x77, 0x33, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09,
0x3c, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x77, 0x33, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x77, 0x33, 0x2d, 0x62, 0x6c, 0x75, 0x65, 0x22, 0x20,
0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x65, 0x75, 0x6c, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x22, 0x3e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x20, 0x41, 0x67,
0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a };
unsigned int k_eula_len = 2499;

View File

@@ -1,6 +1,5 @@
#include "httpd.js.h" #include "httpd.js.h"
#include "eula.h"
#include "file.js.h" #include "file.js.h"
#include "http.h" #include "http.h"
#include "log.h" #include "log.h"
@@ -14,7 +13,6 @@
#include "sodium/crypto_sign.h" #include "sodium/crypto_sign.h"
#include "sodium/utils.h" #include "sodium/utils.h"
#include "zlib.h"
#if defined(__APPLE__) #if defined(__APPLE__)
#include <TargetConditionals.h> #include <TargetConditionals.h>
@@ -25,6 +23,8 @@
#define YELLOW "\e[1;33m" #define YELLOW "\e[1;33m"
#define RESET "\e[0m" #define RESET "\e[0m"
static const int k_eula_version = 1;
static JSClassID _httpd_request_class_id; static JSClassID _httpd_request_class_id;
typedef struct _http_user_data_t typedef struct _http_user_data_t
@@ -645,12 +645,11 @@ static void _httpd_root_work(tf_ssb_t* ssb, void* user_data)
false; false;
#endif #endif
int64_t accepted_eula_crc = 0; int64_t accepted_eula_version = 0;
uint32_t eula_crc = crc32(crc32(0, NULL, 0), k_eula, k_eula_len);
sqlite3* db = tf_ssb_acquire_db_reader(ssb); sqlite3* db = tf_ssb_acquire_db_reader(ssb);
tf_ssb_db_get_global_setting_int64(db, "accepted_eula_crc", &accepted_eula_crc); tf_ssb_db_get_global_setting_int64(db, "accepted_eula_version", &accepted_eula_version);
if (require_eula && accepted_eula_crc != eula_crc) if (require_eula && accepted_eula_version != k_eula_version)
{ {
root->path = tf_strdup("/static/eula.html"); root->path = tf_strdup("/static/eula.html");
} }
@@ -689,12 +688,11 @@ static void _httpd_endpoint_root(tf_http_request_t* request)
static void _httpd_accept_eula_work(tf_ssb_t* ssb, void* user_data) static void _httpd_accept_eula_work(tf_ssb_t* ssb, void* user_data)
{ {
uint32_t eula_crc = crc32(crc32(0, NULL, 0), k_eula, k_eula_len);
char buffer[64]; char buffer[64];
snprintf(buffer, sizeof(buffer), "%u", eula_crc); snprintf(buffer, sizeof(buffer), "%d", k_eula_version);
sqlite3* db = tf_ssb_acquire_db_writer(ssb); sqlite3* db = tf_ssb_acquire_db_writer(ssb);
tf_ssb_db_set_global_setting_from_string(db, "accepted_eula_crc", buffer); tf_ssb_db_set_global_setting_from_string(db, "accepted_eula_version", buffer);
tf_ssb_release_db_writer(ssb, db); tf_ssb_release_db_writer(ssb, db);
} }

View File

@@ -338,7 +338,7 @@ static const setting_t k_settings[] = {
.type = "boolean", .type = "boolean",
.description = "Whether to attempt to keep several peer connections open.", .description = "Whether to attempt to keep several peer connections open.",
.default_value = { .kind = k_kind_bool, .bool_value = false } }, .default_value = { .kind = k_kind_bool, .bool_value = false } },
{ .name = "accepted_eula_crc", .type = "hidden", .description = "The CRC32 of the last accepted EULA.", .default_value = { .kind = k_kind_int, .int_value = 0 } }, { .name = "accepted_eula_version", .type = "hidden", .description = "The version of the last accepted EULA.", .default_value = { .kind = k_kind_int, .int_value = 0 } },
}; };
static const setting_t* _util_get_setting(const char* name, tf_setting_kind_t kind) static const setting_t* _util_get_setting(const char* name, tf_setting_kind_t kind)