diff --git a/GNUmakefile b/GNUmakefile index 71e404bb..14e70b52 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -876,10 +876,6 @@ src/version.h : $(firstword $(MAKEFILE_LIST)) @echo "#define VERSION_NUMBER \"$(VERSION_NUMBER)\"" > $@ @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)) @echo "[android_version] $@" @sed -i \ diff --git a/core/eula.html b/core/eula.html index ac3a2dce..6c11e1f9 100644 --- a/core/eula.html +++ b/core/eula.html @@ -1,12 +1,12 @@ - Tilde Friends End User License Agreement + Tilde Friends Usage Agreement - -

Tilde Friends End User License Agreement

+ +

Tilde Friends Usage Agreement

Tilde Friends is an app that enables communication with other users through the @@ -15,31 +15,27 @@ > protocol.

-

You are responsible for your actions

+

Your actions are your responsibility

Apple tolerates no objectionable content or abusive users on their platforms.

- Your government, employer, family, friend group, etc. may impose - additional restrictions on acceptable behavior that you may be expected to - follow. -

-

- You are solely responsible for your own actions within this app, - especially but not limited to what content you choose to post. + You are responsible for your own actions within this app. You are + responsible for complying with all applicable rules and laws.

You choose what you see

- You are in full control of the content you see in Tilde Friends by the - 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 - see no content from other users. + 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 + directly determine the content presented to you. Initially you will be + following no one with no connections and as a result see no user-generated + content.

- 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 - following you will not see it as a result of following you. + following you will not see it as a consequence of following you.

The admin app contains a variety of settings that control the @@ -48,19 +44,22 @@

This app is not a service

- This app relies on no official servers. The author of this app has no more - ability to see or filter what you post or read than any other user of the - network. + Tilde Friends is an app. It relies on no servers. The author of this app + has no more ability to see or filter what you post or read than any other + user of the network.

If you believe objectionable content obtained from a service that is - running as part of the Secure Scuttlebutt network should be flagged, look - for an email address contact for the service, generally by accessing the - server address in a web browser, and report it to the operator. + running as part of the Secure Scuttlebutt network should be flagged, report + it to the operator of the service, generally by contacting the email address + listed when visiting the server address in a web browser.

-

Agree with these terms?

-

If you do not accept these terms, do not use this app.

-
+

Agreement

+

+ If you do not accept these terms, do not use this app. You may close and + delete it now. +

+
Accept Agreement
diff --git a/src/eula.h b/src/eula.h deleted file mode 100644 index 5564337a..00000000 --- a/src/eula.h +++ /dev/null @@ -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; diff --git a/src/httpd.js.c b/src/httpd.js.c index bc98d6a8..c3aac152 100644 --- a/src/httpd.js.c +++ b/src/httpd.js.c @@ -1,6 +1,5 @@ #include "httpd.js.h" -#include "eula.h" #include "file.js.h" #include "http.h" #include "log.h" @@ -14,7 +13,6 @@ #include "sodium/crypto_sign.h" #include "sodium/utils.h" -#include "zlib.h" #if defined(__APPLE__) #include @@ -25,6 +23,8 @@ #define YELLOW "\e[1;33m" #define RESET "\e[0m" +static const int k_eula_version = 1; + static JSClassID _httpd_request_class_id; typedef struct _http_user_data_t @@ -645,12 +645,11 @@ static void _httpd_root_work(tf_ssb_t* ssb, void* user_data) false; #endif - int64_t accepted_eula_crc = 0; - uint32_t eula_crc = crc32(crc32(0, NULL, 0), k_eula, k_eula_len); + int64_t accepted_eula_version = 0; sqlite3* db = tf_ssb_acquire_db_reader(ssb); - tf_ssb_db_get_global_setting_int64(db, "accepted_eula_crc", &accepted_eula_crc); - if (require_eula && accepted_eula_crc != eula_crc) + tf_ssb_db_get_global_setting_int64(db, "accepted_eula_version", &accepted_eula_version); + if (require_eula && accepted_eula_version != k_eula_version) { 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) { - uint32_t eula_crc = crc32(crc32(0, NULL, 0), k_eula, k_eula_len); 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); - 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); } diff --git a/src/util.js.c b/src/util.js.c index b3d1badc..52bee993 100644 --- a/src/util.js.c +++ b/src/util.js.c @@ -338,7 +338,7 @@ static const setting_t k_settings[] = { .type = "boolean", .description = "Whether to attempt to keep several peer connections open.", .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)