Skip to content

Commit aef9c68

Browse files
committed
ZendTo-6.04-1
1 parent a7ea8f7 commit aef9c68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2896
-744
lines changed

ChangeLog

+33
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
Version 6.04-1 Beta
2+
- Overhauled the "request a drop-off" page.
3+
- Added new feature to requests: you can now set a start and end date+time.
4+
Outside those times, the request won't work.
5+
- Fixed bug where admins logging in via SAML would not see statistics
6+
button in main menu. Alternative workaround is to list 'authAdmins'
7+
users in 'authStats' as well.
8+
- Changed 'Content-Security-Policy' header definition in Apache config.
9+
Exact change is to replace "img-src *" with "img-src data: *", then
10+
restart Apache. Otherwise the date/time picker in the "Request a
11+
Drop-off" form will not display correctly.
12+
- Subject in new drop-off form can now only be edited if you are logged in.
13+
- Fixed bug in unlock-user to get all the reporting correct, and fix and
14+
improve logging. Thanks Marlon!
15+
- Improved "upgrade" command so it warns you if you have *.rpmnew or
16+
*.dpkg-dist files in your templates dir that you need to move into place
17+
by hand, as you had modified the previous versions.
18+
- Improved "upgrade" command so it checks you have a 'Content-Security-
19+
Policy' header definition in your Apache config for the https ZendTo site.
20+
And if so, adds "data:" to the list of valid sources of images.
21+
Otherwise the date+time pickers in the "request a drop-off" page will
22+
look messed up. If it doesn't find the header definition at all, it
23+
suggests the change you need to make.
24+
25+
Version 6.03-5 Production
26+
- Fixed bug where the wrong reminder emails were being sent to users.
27+
- Fixed formatting error in plain-text emails about a new drop-off.
28+
- Fixed bug where changing language immediately before/after doing SAML
29+
login could produce blank page.
30+
- Fixed bug where "Decline" button in GDPR cookie-consent bar was not
31+
being translated.
32+
- Updated Turkish and Brazilian Portuguese translations.
33+
134
Version 6.03-4 Production
235
- HTML emails now display correctly on systems running in Dark mode.
336
- 'showEmailPasscodeCheckbox' now has the expected result in the New

bin/check_apache_conf

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env bash
2+
3+
# JKF 2020-07-22
4+
# Find the right apache site config file for their https ZendTo site.
5+
# Check it has a Content-Security-Policy header definition.
6+
# Check it has an img-src setting.
7+
# Check that contains "data:" as well as "*".
8+
# If not, fix it automatically.
9+
#
10+
# This is needed for the date/time pickers in the request page to
11+
# work properly. Otherwise you see no buttons in the pickers.
12+
13+
# This is a list of all the possible places the Installer might have put
14+
# the https site config, depending on exactly what version of what OS
15+
# we are running on.
16+
CONFS="/etc/apache2/sites-available/001-zendto-ssl /etc/apache2/sites-available/001-zendto-ssl.conf /etc/httpd/conf.d/zendto-ssl.conf /usr/local/etc/apache24/Includes/zendto-ssl.conf /etc/apache2/vhosts.d/zendto-ssl.conf"
17+
18+
# Find the first one of the list above that exists
19+
for F in $CONFS
20+
do
21+
if [ -e "$F" ]; then
22+
CONFIG=$F
23+
break;
24+
fi
25+
done
26+
27+
# If we didn't find it, see if they put it on the command-line
28+
if [ "x$CONFIG" = "x" ]; then
29+
CONFIG="$1"
30+
fi
31+
# Nope.
32+
if [ "x$CONFIG" = "x" ]; then
33+
echo "Failed to find your Apache config for the https ZendTo site."
34+
echo "Security check skipped."
35+
echo "You can give the location of the file on the command-line to help me."
36+
exit 1
37+
fi
38+
39+
echo "Checking your Apache config $CONFIG"
40+
41+
if grep -q '^[ ]*Header.*Content-Security-Policy' "$CONFIG"; then
42+
echo "I have found a Content-Security-Policy header definition."
43+
HEADER="$( grep '^[ ]*Header.*Content-Security-Policy' "$CONFIG" | head -1 )"
44+
# Now find the "img-src" setting in the header
45+
if echo "$HEADER" | grep -q 'img-src '; then
46+
IMGSRC="$( echo "$HEADER" | perl -pe 's/^.*(img-src.*?;).*$/$1/' )"
47+
if echo "$IMGSRC" | grep -q ' data:'; then
48+
echo "Good, you already have data: in the list of valid sources of images."
49+
echo "So I do not need to do anything."
50+
else
51+
echo "I need to add 'data:' to the list of 'img-src' values so it reads"
52+
echo " img-src data: *;"
53+
echo "Otherwise the date and time pickers will not work."
54+
echo
55+
echo "I will do it for you now"
56+
perl -pi.bak -e 's/^(\s*Header.*Content-Security-Policy\s+.*?img-src)[^;]*/$1 data: */' "$CONFIG"
57+
echo "Apache configuration $CONFIG updated."
58+
echo "The old file is in $CONFIG.bak if you have any problems."
59+
echo
60+
echo "Restart Apache, or just reboot, for the change to take effect."
61+
fi
62+
else
63+
echo "Did not find an img-src definition in your Content-Security-Policy header"
64+
echo "You should add one that says"
65+
echo " img-src data: *;"
66+
echo "and then restart Apache."
67+
fi
68+
else
69+
echo "I did not find a definition for the Content-Security-Policy header."
70+
echo "I strongly advise you add one to improve the security of your ZendTo service."
71+
echo 'You need to add this setting (as 1 very long line) to anywhere'
72+
echo "in the middle of the file $CONFIG"
73+
echo
74+
cat <<EOH
75+
Header set Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com https://www.recaptcha.net; connect-src 'self' 'unsafe-inline'; img-src data: *; font-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-src 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com"
76+
EOH
77+
echo
78+
echo "and restart Apache (or reboot)."
79+
fi
80+

bin/upgrade

+32-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ if [ -n "$ZENDTOPREFS" -a -f "$ZENDTOPREFS" ]; then
9191
if [ "x$Latest" != "x" -a "x$Previous" != "x" ]; then
9292
if [ "$Latest" = "$Previous" ]; then
9393
# There is only 1 version-numbered dir. Assume that's the new one
94-
$DRYRUN && shout "Only 1 version-numbered directory"
94+
$DRYRUN && shout "Only 1 version-numbered directory"
9595
OldZTConf="$NewConfigDir/zendto.conf"
9696
OldConfigDir="$NewConfigDir"
9797
NewZendToDir="$Latest"
9898
NewBin="$NewZendToDir/bin"
99+
NewTemplatesDir="$NewZendToDir/templates"
99100
NewConfigDir="$NewZendToDir/config"
100101
Prefs="$Latest/config/preferences.php"
101102
TemplatePrefs="$Prefs"
@@ -104,11 +105,12 @@ if [ -n "$ZENDTOPREFS" -a -f "$ZENDTOPREFS" ]; then
104105
TemplateZTConf="$ZTConf"
105106
else
106107
# The Latest and Previous versions are different
107-
$DRYRUN && shout "Found 2 different version numbers"
108+
$DRYRUN && shout "Found 2 different version numbers"
108109
NewZendToDir="$Latest"
109110
NewBin="$NewZendToDir/bin"
111+
NewTemplatesDir="$NewZendToDir/templates"
110112
NewConfigDir="$NewZendToDir/config"
111-
OldConfigDir="$Previous/config"
113+
OldConfigDir="$Previous/config"
112114
Prefs="$Latest/config/preferences.php"
113115
TemplatePrefs="$Prefs"
114116
OldPrefs="$Previous/config/preferences.php"
@@ -126,6 +128,7 @@ if [ -n "$ZENDTOPREFS" -a -f "$ZENDTOPREFS" ]; then
126128
$DRYRUN && shout "No version numbered dirs found, assuming symlink is a fluke"
127129
# NewZendToDir and NewConfigDir already set
128130
NewBin="$NewZendToDir/bin"
131+
NewTemplatesDir="$NewZendToDir/templates"
129132
OldConfigDir="$NewConfigDir"
130133
Prefs="$ZENDTOPREFS"
131134
TemplatePrefs=''
@@ -138,6 +141,7 @@ if [ -n "$ZENDTOPREFS" -a -f "$ZENDTOPREFS" ]; then
138141
# No symlinks found
139142
$DRYRUN && shout "$NewZendToDir is not a symlink"
140143
NewBin="$NewZendToDir/bin"
144+
NewTemplatesDir="$NewZendToDir/templates"
141145
OldConfigDir="$NewConfigDir"
142146
Prefs="$ZENDTOPREFS"
143147
TemplatePrefs=''
@@ -149,6 +153,8 @@ if [ -n "$ZENDTOPREFS" -a -f "$ZENDTOPREFS" ]; then
149153
else
150154
$DRYRUN && shout "Could not find old config $ZENDTOPREFS at all"
151155
NewZendToDir=/opt/zendto
156+
NewBin="$NewZendToDir/bin"
157+
NewTemplatesDir="$NewZendToDir/templates"
152158
NewConfigDir="$NewZendToDir/config"
153159
OldConfigDir="$NewConfigDir"
154160
Prefs="$NewConfigDir/preferences.php"
@@ -163,6 +169,7 @@ if $DRYRUN; then
163169
shout "Files are:"
164170
shout "NewZendToDir = $NewZendToDir"
165171
shout "NewBin = $NewBin"
172+
shout "NewTemplatesDir = $NewTemplatesDir"
166173
shout "OldConfigDir = $OldConfigDir"
167174
shout "NewConfigDir = $NewConfigDir"
168175
shout "OldPrefs = $OldPrefs"
@@ -377,15 +384,35 @@ else
377384
echo
378385
fi
379386

380-
381387
# Put all the SELinux attributes back, if it's being used
382388
if sestatus >/dev/null 2>&1; then
383389
restorecon -F -R /opt/zendto >/dev/null 2>&1
384390
fi
385391

392+
# Check the apache site config for the https site, must have img-src right
393+
echo
394+
"$NewBin"/check_apache_conf
395+
echo
396+
397+
# Tell them if they have *.rpmnew files in zendto/templates, as they
398+
# will need to move these into place (incorporating any customisations
399+
# they want to keep) before anything will work correctly.
400+
if compgen -G "$NewTemplatesDir/*.dpkg-dist" >/dev/null ||
401+
compgen -G "$NewTemplatesDir/*.rpmnew" >/dev/null; then
402+
echo
403+
shout '*** WARNING ***'
404+
shout ''
405+
shout "In your $NewTemplatesDir directory, you have new versions"
406+
shout "of the user interface template (.tpl) files which you need"
407+
shout "to move into place manually before everything will work properly."
408+
shout "These end in either '.dpkg-dist' or '.rpmnew'."
409+
echo
410+
pause
411+
fi
412+
386413
if [ -d "$OLDSTORE" ]; then
387414
echo
388-
shout "Please look in $OLDSTORE to find the old versions of"
415+
shout "You can look in $OLDSTORE to find the old versions of"
389416
shout "the preferences.php and/or zendto.conf files."
390417
echo
391418
fi

config/locale/cs_CZ/LC_MESSAGES/zendto.po

+71-14
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ msgid ""
2323
msgstr ""
2424
"Project-Id-Version: ZendTo 5.15\n"
2525
"Report-Msgid-Bugs-To: \n"
26-
"POT-Creation-Date: 2020-07-05 12:09+0100\n"
26+
"POT-Creation-Date: 2020-07-22 17:17+0100\n"
2727
"PO-Revision-Date: 2020-06-10 14:04+0200\n"
2828
"Last-Translator: Dizzy Easy <[email protected]>\n"
2929
"Language-Team: Czech <[email protected]>\n"
@@ -106,12 +106,23 @@ msgstr "Můžete stále posílat soubory přímo z hlavní nabídky nebo požád
106106
msgid "Request Code Used"
107107
msgstr "Kód požadavku byl již použitý"
108108

109-
msgid "Your Request Code has expired. Please start again."
110-
msgstr "Platnost kódu požadavku vypršela. Prosím, začněte znovu."
109+
msgid "Please ask for a new Request."
110+
msgstr ""
111111

112-
msgid "Request Code Expired"
112+
#, fuzzy
113+
msgid "Your Request Code has expired."
113114
msgstr "Platnost Kódu požadavku vypršela"
114115

116+
msgid "Please wait for %1$s, until %2$s."
117+
msgstr ""
118+
119+
#, fuzzy
120+
msgid "Your Request Code cannot be used yet."
121+
msgstr "Váš Kód požadavku nebyl nalezen nebo již byl použit."
122+
123+
msgid "The end time you set has already passed."
124+
msgstr ""
125+
115126
msgid "Request Error"
116127
msgstr "Chyba požadavku"
117128

@@ -130,6 +141,9 @@ msgstr "Nelze znovu odeslat zásilku"
130141
msgid "Unlocked %s."
131142
msgstr "Odemčeno %s."
132143

144+
msgid "Security"
145+
msgstr ""
146+
133147
msgid "Unknown user"
134148
msgstr "Neznámý uživatel"
135149

@@ -316,6 +330,12 @@ msgstr "Adresář, který obsahuje soubory této zásilky zmizel."
316330
msgid "Drop-off Directory Not Found"
317331
msgstr "Nepodařilo se nalézt adresář zásilky"
318332

333+
msgid "You cannot create a drop-off from your request yet. Please wait until %s before uploading your files."
334+
msgstr ""
335+
336+
msgid "The request you used to create this drop-off has expired. You will need to contact the other person again to get a new 'request for files'."
337+
msgstr ""
338+
319339
msgid "Failed to read your verification information. Your drop-off session has probably expired. Please start again."
320340
msgstr "Nepodařilo se přečíst ověřovací informace. Vaše zásilka pravděpodobně překročila lhůtu platnosti. Začněte prosím znovu."
321341

@@ -733,9 +753,6 @@ msgstr "soubor"
733753
msgid "%1 files"
734754
msgstr "%1 soubory(ů)"
735755

736-
msgid "%1 <%2> has dropped off %3 for you."
737-
msgstr "%1 <%2> pro vás uložil(a) zásilku."
738-
739756
msgid "IF YOU TRUST THE SENDER, and are expecting to receive a file from them, you may choose to retrieve the drop-off by clicking the following link (or copying and pasting it into your web browser):"
740757
msgstr "POKUD ODESÍLATELI DŮVĚŘUJETE a očekáváte od něho zaslání souborů, můžete si zásilku vyzvednout kliknutím na následující odkaz (případně zkopírováním odkazu do prolížeče):"
741758

@@ -1139,10 +1156,12 @@ msgstr "Soubory nahrávané na %1 jsou skenovány na přítomnost škodlivého k
11391156
msgid "Users are also <strong>strongly encouraged</strong> to encrypt every file if any contain sensitive information (e.g. personal private information)!"
11401157
msgstr "Pokud nahráváte citlivé informace, doporučujeme Vám <strong>Zašifrovat soubor(y)</strong>!"
11411158

1142-
msgid "This web page will allow you to drop-off (upload) one or more files for anyone (either a %1 user or others). The recipient will receive an automated email containing the information you enter below and instructions for downloading the file. Your IP address will also be logged and sent to the recipient for identity confirmation purposes."
1159+
#, fuzzy
1160+
msgid "Use this form to drop-off (upload) one or more files for anyone (either a %1 user or others). The recipient will receive an automated email containing the information you enter below and instructions for downloading the file. Your IP address will also be logged and sent to the recipient for identity confirmation purposes."
11431161
msgstr "Tato webová stránka vám umožní uložit jeden nebo více souborů pro každého uživatele %1 nebo externího uživatele. Příjemce obdrží automatický e-mail obsahující informace, které zadáte níže, a pokyny pro stažení souboru."
11441162

1145-
msgid "This web page will allow you to drop-off (upload) one or more files for a %1 user. The recipient will receive an automated email containing the information you enter below and instructions for downloading the file. Your IP address will also be logged and sent to the recipient for identity confirmation purposes."
1163+
#, fuzzy
1164+
msgid "Use this form to drop-off (upload) one or more files for a %1 user. The recipient will receive an automated email containing the information you enter below and instructions for downloading the file. Your IP address will also be logged and sent to the recipient for identity confirmation purposes."
11461165
msgstr "Tato webová stránka vám umožní nahrát jeden nebo více souborů pro uživatele %1. Příjemce obdrží automatický e-mail obsahující informace, které jste zadali níže a pokyny pro stahování souboru. Vaše IP adresa bude také zaznamenána a odeslána příjemci pro účely potvrzení totožnosti."
11471166

11481167
msgid "From"
@@ -1304,9 +1323,13 @@ msgstr "Toto je požadavek od uživatele %1."
13041323
msgid "Please click on the link below and drop off the file or files I have requested."
13051324
msgstr "Prosím, klikněte na níže uvedený odkaz a nahrajte požadovaný soubor nebo soubory."
13061325

1307-
msgid "The link is only valid for %1 from the time of this email."
1326+
#, fuzzy
1327+
msgid "The link is only valid from %1 to %2."
13081328
msgstr "Odkaz je platný pouze %1 od doby odeslání tohoto e-mailu."
13091329

1330+
msgid "After that time it will automatically expire."
1331+
msgstr ""
1332+
13101333
msgid "All files you upload will be automatically encrypted."
13111334
msgstr "Všechny posílané soubory budou automaticky zašifrovány."
13121335

@@ -1325,7 +1348,8 @@ msgstr "Zkopírováno"
13251348
msgid "The request for a Drop-off has been sent to %1 at %2."
13261349
msgstr "Požadavek na uložení zásilky byl odeslán uživateli %1, %2."
13271350

1328-
msgid "It is valid for %1."
1351+
#, fuzzy
1352+
msgid "It is valid from %1 to %2."
13291353
msgstr "Platnost %1."
13301354

13311355
msgid "The files they send you will be encrypted with the passphrase you just entered. Do not lose it or you will not be able to access the files!"
@@ -1373,24 +1397,54 @@ msgstr "Nejprve zadejte předmět emailu!"
13731397
msgid "Your note is too long!"
13741398
msgstr "Vaše poznámka je příliš dlouhá!"
13751399

1400+
#, fuzzy
1401+
msgid "Your request must expire after it starts!"
1402+
msgstr "Platnost kódu požadavku vypršela. Prosím, začněte znovu."
1403+
13761404
msgid "Optional: if you select this and set a passphrase, the drop-off will be encrypted. The person sending the files will never know the passphrase."
13771405
msgstr "Volitelné: Pokud vyberete tuto možnost a nastavíte přístupové heslo, bude zásilka šifrována. Osoba odesílající soubory nebude znát přístupové heslo."
13781406

13791407
msgid "This is normally selected. If you deselect it, the link and instructions will not be sent by email. Instead you will just be shown the link they need, so you can send it by other means."
13801408
msgstr "Tato volba bývá obvykle vybrána. Pokud ji zrušíte, odkaz a pokyny nebudou zaslány e-mailem. Místo toho se vám zobrazí pouze odkaz, který potřebuje příjemce zásilky a můžete jej odeslat jiným způsobem."
13811409

1382-
msgid "This web page will allow you to send a request to one of more other people requesting that they send (upload) one or more files for you. The recipient will receive an automated email containing the information you enter below and instructions for uploading the file(s)."
1410+
msgid "Multiple email addresses should be separated with a comma \",\" or semicolon \";\". Each recipient will be sent a different link."
1411+
msgstr ""
1412+
1413+
#, fuzzy
1414+
msgid "Use this form to send a request to one of more other people requesting that they send (upload) one or more files for you. The recipient will receive an automated email containing the information you enter below and instructions for uploading the file(s)."
13831415
msgstr "Tato webová stránka vám umožní odeslat požadavek osobám, po kterých požadujete nahrání souboru(ů). Příjemce obdrží automatický e-mail obsahující informace, které zadáte níže a instrukce pro nahrání souboru(ů)."
13841416

1417+
#, fuzzy
1418+
msgid "Unless you change the dates or times below, the request created will be valid for %1."
1419+
msgstr "Požadavek je platný %1."
1420+
13851421
msgid "Email(s)"
13861422
msgstr "E-mail(y)"
13871423

1388-
msgid "Send email"
1389-
msgstr "Odeslat email"
1424+
#, fuzzy
1425+
msgid "Name: adds to your address book"
1426+
msgstr "Přidat do vašeho adresáře"
1427+
1428+
#, fuzzy
1429+
msgid "One or more email addresses"
1430+
msgstr "Vaše e-mailová adresa"
1431+
1432+
msgid "Subject line of the email"
1433+
msgstr ""
1434+
1435+
#, fuzzy
1436+
msgid "Drop-off must occur between"
1437+
msgstr "Zásilka není zašifrována"
1438+
1439+
msgid "and"
1440+
msgstr ""
13901441

13911442
msgid "This will be sent to the recipient. It will also be included in the resulting drop-off sent to you."
13921443
msgstr "Níže uvedený text bude odeslán emailem příjemci, kterého žádáte o nahrání souborů. Odkaz a instrukce pro nahrání budou do emailu doplněny automaticky."
13931444

1445+
msgid "Send email"
1446+
msgstr "Odeslat email"
1447+
13941448
msgid "Do not lose or forget this passphrase!"
13951449
msgstr "Nezapomeňte toto přístupové heslo!"
13961450

@@ -1633,6 +1687,9 @@ msgstr "Jakmile ji obdržíte, klikněte prosím na odkaz ve zprávě. Doručen
16331687
msgid "Send confirmation"
16341688
msgstr "Odeslat ověření"
16351689

1690+
#~ msgid "%1 <%2> has dropped off %3 for you."
1691+
#~ msgstr "%1 <%2> pro vás uložil(a) zásilku."
1692+
16361693
#~ msgid "Recipient"
16371694
#~ msgstr "Příjemce"
16381695

0 commit comments

Comments
 (0)