diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..486a232 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.zip filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..48b187d --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: dl +# $Id: Makefile,v 1.1 2021/04/18 16:00:51 jpp Exp $ +NAME := dl +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 875000e..5059dff 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # dl -3rd Party (Maintained by Koozali) git repo for dl smecontribs \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for dl smecontribs + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..9b7fd51 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +contribs10 diff --git a/dl-0.18.1-add-in-help-html.patch b/dl-0.18.1-add-in-help-html.patch new file mode 100644 index 0000000..2c8bac3 --- /dev/null +++ b/dl-0.18.1-add-in-help-html.patch @@ -0,0 +1,3252 @@ +diff -urN dl-0.18.1.old/htdocs/static/guide/de_DE/index.html dl-0.18.1/htdocs/static/guide/de_DE/index.html +--- dl-0.18.1.old/htdocs/static/guide/de_DE/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/de_DE/index.html 2017-09-06 17:09:36.000000000 +0100 +@@ -0,0 +1,467 @@ ++ ++ ++ ++ ++ ++ ++Download ticket service ++ ++ ++ ++
++

Download ticket service

++ ++
++

Inhalt

++ ++
++
++

Kurze Schritt-für-Schritt Anleitung zum Senden von Anhängen

++

Rufen Sie die Webseite https://dl.example.com/ auf und melden Sie sich mit ++Ihrem Benutzernamen und Passwort an. Nach der Anmeldung erscheint die folgende ++Seite:

++t-step-1.png ++
    ++
  1. Klicken Sie, wie in der Abbildung gezeigt, auf "Durchsuchen" und wählen Sie ++die zu sendende Datei aus.
  2. ++
  3. Klicken Sie auf "Senden" und warten Sie, bis die Datei hochgeladen wurde, ++siehe folgende Abbildung.
  4. ++
++t-step-2.png ++
    ++
  1. Klicken Sie auf "Per E-Mail verschicken", um den Link zur gerade ++hochgeladenen Datei einem beliebigen Empfänger über Ihr E-Mail Programm zu ++schicken.
  2. ++
++

Bei Verwendung der Standardeinstellungen hat der Empfänger eine Woche Zeit, um ++die Datei herunterzuladen, bevor diese automatisch gelöscht wird. Diese Frist ++kann jedoch geändert werden indem Sie die entsprechenden Parameter vor dem ++hochladen anpassen.

++

Durch einen Klick auf "Aktive Tickets" am unteren Ende der Seite, kann die ++Liste der hochgeladenen Dateien eingesehen und einzelne Tickets verwaltet ++werden.

++
++
++

Kurze Schritt-für-Schritt Anleitung zum Empfangen von Anhängen

++

Rufen Sie die Webseite https://dl.example.com/ auf und melden Sie sich mit ++Ihrem Benutzernamen und Passwort an. Nach der Anmeldung erscheint die folgende ++Seite:

++g-step-1.png ++
    ++
  1. Klicken Sie auf "Neue Upload-Erlaubnis" am unteren Ende der Seite
  2. ++
++g-step-2.png ++
    ++
  1. Geben Sie Ihre E-Mailadresse an.
  2. ++
  3. Klicken Sie auf "Erstellen" um die Erlaubnis zu erstellen.
  4. ++
++g-step-3.png ++
    ++
  1. Klicken Sie auf "Per E-Mail verschicken", um die Upload-Erlaubnis an einen ++beliebigen Empfänger zu schicken.
  2. ++
++

Der Empfänger braucht nach Erhalt der Upload-Erlaubnis den darin enthaltenen ++Link lediglich in einem Browser aufzurufen und die Anweisungen am Bildschirm zu ++befolgen. Sobald der Empfänger die Datei hochgeladen hat, wird Ihnen eine ++Bestätigungs-E-Mail mit einem Link zur hochgeladenen Datei zugeschickt.

++
++
++

Erweiterte Einstellungen

++

Vor dem Versand einer Datei ist es möglich die Verfallsfristen unter dem Abschnitt "Weitere Optionen" anzupassen.

++t-advanced.png ++

Wenn Sie möchten, dass die Datei nicht automatisch gelöscht wird, aktivieren ++Sie die Option "Ticket ohne Verfallsfrist ", die Sie unter "Weitere Optionen" ++finden. Die Datei wird dann solange zur Verfügung stehen, bis sie manuell ++gelöscht wird.

++

Wenn Sie für jeden einzelnen Download einer Datei eine Meldung erhalten ++möchten, geben Sie Ihre E-Mail-Adresse im Feld "Bei Download folgende ++E-Mailadresse benachrichtigen" ein. Sie finden das Feld unter "Weitere ++Optionen".

++

Frist in # Tagen:

++
++Hier können Sie die maximale Anzahl von Tagen angeben, welche die gesendete ++Datei auf dem Server erhalten bleibt. Nach Ablauf dieser Frist wird die Datei ++automatisch gelöscht, unabhängig davon ob sie heruntergeladen wurde oder ++nicht.
++

Frist in # Stunden, nach dem letzten Download:

++
++

Hier können Sie die maximale Anzahl von Stunden angeben, für welche die Datei ++nach dem letzten Download noch auf dem Server verbleiben soll. Jeder weiterer ++Download legt die Verfallsfrist um die angegebene Stundenanzahl erneut fest. ++Ist die Frist abgelaufen, wird die Datei automatisch gelöscht.

++

Diese Frist-Angabe ermöglicht Ihnen bei Verwendung von großen Zeiträumen ++(Tage/Wochen) häufig verwendete Tickets für einen unbestimmten Zeitraum aktiv ++zu erhalten und sie automatisch zu löschen, sobald sie nicht mehr verwendet ++werden.

++

Wird die Frist-Angabe hingegen mit kurzen Zeiträumen verwendet (bis zu 24 ++Stunden), wird das Ticket nach dem Herunterladen schnell entfernt, gibt dem ++Empfänger aber noch einen kleinen Spielraum für weitere Downloads.

++
++

Frist in # Downloads:

++
++Hier können Sie festlegen, wie oft eine Datei insgesamt vom Server ++heruntergeladen werden kann. Bei Erreichen dieser Anzahl wird die Datei ++automatisch gelöscht.
++

Wird mindestens eine der oben beschriebenen Fristen überschritten, verfällt das ++Ticket und wird somit automatisch gelöscht. Sie können eine oder mehrere ++Fristen deaktivieren, indem Sie den entsprechenden Parameter auf "0" setzen.

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/en_EN/index.html dl-0.18.1/htdocs/static/guide/en_EN/index.html +--- dl-0.18.1.old/htdocs/static/guide/en_EN/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/en_EN/index.html 2017-09-06 17:09:37.000000000 +0100 +@@ -0,0 +1,464 @@ ++ ++ ++ ++ ++ ++ ++Download ticket service ++ ++ ++ ++
++

Download ticket service

++ ++
++

Contents

++ ++
++
++

Short Step-by-step guide to send attachments

++

First, go to https://dl.example.com/ and authenticate with your username and ++password.

++

You should be presented with this page:

++t-step-1.png ++
    ++
  1. Click on the button under "Upload File" (labelled either "Browse" or "Choose ++File") as outlined in the picture and pick the file you need to send.
  2. ++
  3. Click "Upload", and wait until the file is uploaded as shown:
  4. ++
++t-step-2.png ++
    ++
  1. Click "Send via E-Mail" to send an e-mail to someone, containing the link ++to the file you just uploaded.
  2. ++
++

By default, the recipient has one week to download the file before it is ++automatically cleaned up. You can change this behavior by setting some ++parameters before uploading.

++

You can see a list of files you have uploaded and manage them by clicking on ++the "List active tickets" button, at the bottom of the page.

++
++
++

Short Step-by-step guide to receive attachments

++

First, go to https://dl.example.com/ and authenticate with your username and ++password.

++

You should be presented with this page:

++g-step-1.png ++
    ++
  1. Click on the "New grant" link at the bottom of the page to start a new ++grant:
  2. ++
++g-step-2.png ++
    ++
  1. Enter your email address.
  2. ++
  3. Click "Create" to generate an upload grant:
  4. ++
++g-step-3.png ++
    ++
  1. Click "Send via E-Mail" to send an e-mail to someone, containing the link ++that will allow him to send you any file.
  2. ++
++

Your recipient simply needs to follow the instructions contained in the link ++itself. Once he uploads the file into the server, you will receive an email ++containing another link to the file just uploaded.

++
++
++

Advanced upload parameters

++

Before uploading a file, you can customize how the download and cleanup is ++performed by setting some "Advanced" parameters:

++t-advanced.png ++ ++

Expire in total # of hours:

++
++Type the maximal number of hours the uploaded file is allowed to be kept on ++the server. After this period is passed the file will be deleted from the ++server whether is was downloaded or not.
++

Expire in # of hours after last dl:

++
++

Type the number of hours the uploaded file is allowed to be kept on the ++server after being downloaded. Another download will extend the lifetime of ++the ticket for the specified number of hours. After this period is passed ++without activity, the file is be deleted from the server.

++

This feature, when used with a long period (days or weeks), allows "hot" ++tickets to be kept alive only until used, and be deleted automatically ++afterward.

++

When used with a short period (24 hours or less), allows to remove the ticket ++as soon as being downloaded, allowing the recipient some margin to download ++the file more than once.

++
++

Expire after # of downloads:

++
++Type the number of times the uploaded file is allowed to be downloaded in ++total. After this amount is reached the file will be deleted from the ++server. Handy if you need to ensure the file is downloaded just once from a ++single person.
++

If at least one of these parameters expires the file will be deleted. You can ++set any parameter to "0" to disable the condition.

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/es_ES/index.html dl-0.18.1/htdocs/static/guide/es_ES/index.html +--- dl-0.18.1.old/htdocs/static/guide/es_ES/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/es_ES/index.html 2017-09-06 17:09:37.000000000 +0100 +@@ -0,0 +1,465 @@ ++ ++ ++ ++ ++ ++ ++Download ticket service ++ ++ ++ ++
++

Download ticket service

++ ++
++

Contenido

++ ++
++
++

Breve guía paso a paso para subir ficheros

++

Primero, diríjase a https://dl.example.com/ y autentíquese usando su usuario y ++contraseña.

++

Esta página debería ser mostrada:

++t-step-1.png ++
    ++
  1. Cliquee en el botón bajo "Subir fichero" (llamado "Examinar" or "Escoja ++fichero") como se ve en la imagen y seleccione el fichero que necesita subir.
  2. ++
  3. Click en "Subir" y espere mientras el fichero es subido como aquí se muestra:
  4. ++
++t-step-2.png ++
    ++
  1. Click en "Enviar vía e-mail" para enviar un e-mail a alguien con el enlace ++al fichero que acaba de subir.
  2. ++
++

Por defecto, el receptor tiene una semana para descargar el fichero antes de ++este sea eliminado automáticamente. Puede cambiar este comportamiento ++configurando algunos parámetros antes de la subida.

++

Puede ver una lista de ficheros que ha subido y administrarlos cliqueando en el ++botón "Listar tickets activos" a pie de página.

++
++
++

Breve guía paso a paso para recibir ficheros

++

Primero, diríjase a https://dl.example.com/ y autentíquese usando su usuario y ++contraseña.

++

Esta página debería ser mostrada:

++g-step-1.png ++
    ++
  1. Click en el enlace "Nueva concesión" al pie de página para empezar una nueva ++concesión:
  2. ++
++g-step-2.png ++
    ++
  1. Introduzca su dirección de e-mail.
  2. ++
  3. Click en "Crear" para generar una concesión de subida:
  4. ++
++g-step-3.png ++
    ++
  1. Click en "Enviar vía E-Mail" para enviar un e-mail a alguien con el enlace ++a quién le permitirá subir un fichero para usted.
  2. ++
++

El receptor simplemente necesitará seguir las instrucciones contenidas en el ++propio enlace. Una vez este suba un fichero al servidor, usted recibirá un ++e-mail que contendrá un enlace a el fichero que ha sido subido.

++
++
++

Parámetros Avanzados de subida

++

Antes de subir un fichero, puede personalizar cómo se realizará su descarga y ++su limpieza configurando algunos parámetros "avanzados":

++t-advanced.png ++ ++

Expirar en un total de # horas:

++
++Introduzca el número máximo de horas que a un fichero subido le está ++permitido permanecer en el servidor. Pasado este período el fichero será ++eliminado del servidor independientemente de si fue descargado o no.
++

Expirar en # horas tras la última descarga:

++
++

Introduzca el número de horas que a un fichero subido se le permite ++permanecer en el servidor tras haber sido descargado. Una nueva descarga ++alargará el tiempo de vida del ticket durante el número de horas ++especificado. Pasado este período sin actividad el fichero será eliminado del ++servidor.

++

Esta funcionalidad, cuando es usada con un largo período (días o semanas), ++permite a los "hot" tickets permanecer vivos mientras están en uso y ser ++elimindos automáticamente cuando ya no son demandados.

++

Cuando es usado en un período corto (24 horas o menos), permite eliminar el ++ticket tan pronto como sea descargado, permitiendo al receptor algo de margen ++para descargar el fichero más de una vez.

++
++

Expirar tras # descargas:

++
++Introduce el número total de veces que es permitido descargar un fichero ++subido. Alcanzado este número el fichero será eliminado del servidor. Útil si ++quiere asegurarse de que el fichero es descargado sólo una vez por una sola ++persona.
++

Si al menos uno de estos parámetros expira el fichero será eliminado. Puede ++configurar cualquier parámetro a "0" para deshabilitar la condición.

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/fr_FR/index.html dl-0.18.1/htdocs/static/guide/fr_FR/index.html +--- dl-0.18.1.old/htdocs/static/guide/fr_FR/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/fr_FR/index.html 2017-09-06 17:09:37.000000000 +0100 +@@ -0,0 +1,451 @@ ++ ++ ++ ++ ++ ++ ++Service de téléchargement de ticket ++ ++ ++ ++
++

Service de téléchargement de ticket

++ ++
++

Sommaire

++ ++
++
++

Guide rapide pour envoyer des pièces jointes

++

Tout d'abord, allez sur https://dl.example.com/ et authentifier vous avec votre ++nom d'utilisateur et votre mot de passe.

++

Vous devriez voir la page ci-dessous:

++t-step-1.png ++
    ++
  1. Sélectionnez le fichier à envoyer avec le bouton "Parcourir"
  2. ++
  3. Cliquer sur le bouton "Télécharger" pour envoyer votre fichier.
  4. ++
++t-step-2.png ++
    ++
  1. Cliquez sur le bouton "Envoyer par e-mail" pour envoyer par e-mail le lien ++contenant le fichier que vous venez de télécharger.
  2. ++
++

Par défaut, le destinataire dispose d'une semaine pour télécharger le fichier ++avant qu'il ne soit automatiquement supprimé. Vous pouvez modifier ce ++comportement en définissant certains paramètres avant de le télécharger.

++

Vous pouvez voir la liste des fichiers que vous avez téléchargés et aussi les ++gérer en cliquant sur "Tickets actifs", au bas de la page.

++
++
++

Guide rapide pour recevoir des pièces jointes

++

Tout d'abord, allez sur https://dl.example.com/ et authentifier vous avec votre ++nom d'utilisateur et votre mot de passe.

++

Vous devriez voir la page ci-dessous:

++g-step-1.png ++
    ++
  1. Cliquez sur "Nouvelle concession" au bas de la page :
  2. ++
++g-step-2.png ++
    ++
  1. Entrer votre adresse email.
  2. ++
  3. Cliquez sur "Créer" pour générer une concession:
  4. ++
++g-step-3.png ++
    ++
  1. Cliquez sur "Envoyer par e-mail" pour envoyer par e-mail le lien qui ++permettra de vous faire parvenir un fichier.
  2. ++
++

Le destinataire devra simplement suivre les instructions contenues dans le ++mail. Une fois, le fichier téléchargé sur le serveur, vous recevrez un e-mail ++contenant un autre lien vers le fichier que vous pourrez télécharger.

++
++
++

Paramètres avancés

++

Avant de télécharger un fichier, vous pouvez personnaliser les paramètres de ++téléchargement et de supression en modifiant les "Paramètres avancés":

++t-advanced.png ++ ++

Expirera dans # jours:

++
++Indiquer le nombre de jours maximal durant lesquels ce fichier pourra être ++téléchargé. Passé ce délai ce fichier ne pourra plus être téléchargé et sera ++automatiquement supprimé.
++

Expirera dans # heures après le dernier téléchargement:

++
++Indiquer le nombre d'heures pendant lesquelles ce fichier restera disponible ++après avoir été téléchargé. Si celui-ci n'est pas téléchargé pendant le délai ++indiqué, il sera automatiquement supprimé.
++

Expirera après # téléchargement:

++
++Indiquer le nombre total de téléchargements autorisé pour ce fichier. Au-delà ++de cette limite, ce fichier sera automatiquement supprimé.
++

Si au moins un de ces paramètres est appliqué le fichier sera supprimé. Mettre ++n'importe quel paramètre à "0" pour désactiver son état.

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/it_IT/index.html dl-0.18.1/htdocs/static/guide/it_IT/index.html +--- dl-0.18.1.old/htdocs/static/guide/it_IT/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/it_IT/index.html 2017-09-06 17:09:37.000000000 +0100 +@@ -0,0 +1,461 @@ ++ ++ ++ ++ ++ ++ ++Download ticket service ++ ++ ++ ++
++

Download ticket service

++ ++
++

Indice

++ ++
++
++

Guida rapida passo-passo all'invio degli allegati

++

Collegarsi al sito https://dl.example.com/ ed autenticarsi col proprio nome ++utente e password.

++

La schermata iniziale si presenta come segue:

++t-step-1.png ++
    ++
  1. Cliccare su "Sfoglia", come indicato nell'immagine e selezionare il file ++desiderato da inviare.
  2. ++
  3. Cliccare su "Invia" ed attendere fino al completamento dell'operazione, ++indicata dalla seguente schermata:
  4. ++
++t-step-2.png ++
    ++
  1. Cliccare su "Invia per e-mail" per inviare il collegamento al file appena ++caricato via e-mail ad un qualsiasi destinatario usando il proprio programma ++di posta elettronica.
  2. ++
++

Con le impostazioni predefinite, il destinatario avrà una settimana di tempo ++per scaricare il file prima che venga eliminato automaticamente. È possibile ++cambiare la scadenza impostando alcuni parametri prima dell'invio del file.

++

La lista dei file caricati è gestibile cliccando sul collegamento "Ticket ++attivi", disponibile in basso alla pagina.

++
++
++

Guida rapida passo-passo alla ricezione degli allegati

++

Collegarsi al sito https://dl.example.com/ ed autenticarsi col proprio nome ++utente e password.

++

La schermata iniziale si presenta come segue:

++g-step-1.png ++
    ++
  1. Cliccare su "Nuova concessione", in basso alla pagina.
  2. ++
++g-step-2.png ++
    ++
  1. Inserire il proprio indirizzo e-mail.
  2. ++
  3. Cliccare su "Crea" per generare la concessione.
  4. ++
++g-step-3.png ++
    ++
  1. Cliccare su "Invia per email" per inviare la concessione e le istruzioni di ++utilizzo tramite e-mail ad un qualsiasi destinatario.
  2. ++
++

Il destinatario, una volta ricevuto il collegamento alla concessione, dovrà ++semplicemente seguire le indicazioni. Quando il destinatario avrà terminato ++l'invio del file, riceverete immediatamente (tramite e-mail) conferma ed un ++collegamento al file appena trasferito.

++
++
++

Parametri avanzati

++

Prima di procedere all'invio di un file, è possibile impostare la sua ++scadenza accedendo ai parametri avanzati:

++t-advanced.png ++ ++

Scadenza in # giorni:

++
++Inserire il numero massimo di giorni che il file inviato verrà mantenuto nel ++server. Passato il termine, il file viene eliminato automaticamente, sia che ++venga scaricato o meno.
++

Scadenza in # ore dopo l'ultimo scaricamento:

++
++

Inserire il numero ore che il file inviato verrà mantenuto nel server dopo ++essere stato scaricato. Ogni scaricamento estende il termine del numero di ++ore specificato. Passato il termine, il file viene eliminato automaticamente.

++

Questa funzionalità, usata insieme ad un lungo periodo (giorni o settimane), ++permette di mantenere ticket molto utilizzati attivi per un periodo ++indefinito, e rimuoverli automaticamente alla cessazione di utilizzo.

++

Usata invece con periodi brevi (24 ore o meno), consente di eliminare il ++ticket rapidamente dopo lo scaricamento, dando al destinatario del margine ++per effettuarne altri.

++
++

Scadenza in # scaricamenti

++
++Inserire il numero di volte che il file può venire scaricato in totale dal ++server. Passato il termine, il file viene eliminato automaticamente.
++

La scadenza del ticket viene effettuata alla scadenza di uno qualsiasi dei ++termini impostati (solitamente del termine che arriva prima). È possibile ++impostare un parametro a "0" per disabilitarne il relativo termine.

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/ja_JP/index.html dl-0.18.1/htdocs/static/guide/ja_JP/index.html +--- dl-0.18.1.old/htdocs/static/guide/ja_JP/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/ja_JP/index.html 2017-09-06 17:09:37.000000000 +0100 +@@ -0,0 +1,442 @@ ++ ++ ++ ++ ++ ++ ++ダウンロードチケットサービス ++ ++ ++ ++
++

ダウンロードチケットサービス

++ ++
++

目次

++ ++
++
++

簡易版 添付送信ガイド

++

はじめに、https://dl.example.com/ をブラウザで開き、ユーザ名とパスワードで認証を行います。

++

このページになります。:

++t-step-1.png ++
    ++
  1. "ファイルのアップロード" ( "ブラウズ" または "参照..." と書かれている部分) の下のボタンをクリックします。図に書かれているように、送りたいファイルを選択します。
  2. ++
  3. "アップロード" をクリックして、図のようにファイルがアップロードが終わるまで待ちます。:
  4. ++
++t-step-2.png ++
    ++
  1. "電子メールで送る" をクリックして、今アップロードしたファイルをダウンロードするためのリンクが入ったEメールを特定の人にメールを送ります。
  2. ++
++

標準設定では、受け手側は、ファイルが自動的に消される前の1週間以内にファイルのダウンロードを行う必要があります。この動作については、アップロードする前にパラメータを変更することができます。

++

このページの一番下の "有効なチケット" ボタンをクリックすることで、アップロードしたファイルリストを見ることができ、それを管理することができます。

++
++
++

簡易版 添付受信ガイド

++

最初に、 https://dl.example.com/ をブラウザで開き、ユーザ名とパスワードで認証を行います。

++

このページが見えるはずです :

++g-step-1.png ++
    ++
  1. このページの一番下の "新規のグラント" のリンクをクリックすると新しいグラントを作ることができます。:
  2. ++
++g-step-2.png ++
    ++
  1. あなた自身の Eメールアドレスを入力してください。
  2. ++
  3. "作成" をクリックすると、アップロードのグラントが生成されます。:
  4. ++
++g-step-3.png ++
    ++
  1. "電子メールで送る" をクリックすると、特定の人がファイルをあなたに送るのを許可するリンクが入ったEメールをその人に送ります。
  2. ++
++

受け取った人は、メールのリンクに先に書かれている操作に従う必要があります。受け取った人がファイルをサーバにアップロードした後、あなたに別なリンクが入ったメールが自動的に送られます。

++
++
++

詳細アップロードのパラメーター

++

"詳細" のパメラーターで、ファイルをアップロードする前に、ダウンロードとその消去の実行がどのようにおこなうかを設定することができます

++t-advanced.png ++ ++

全体で以下の日で公開満了します:

++
++サーバにファイルを保持する最大日数を入力します。この期間が過ぎると、 ++ファイルがダウンロードされていても、されていなくても、そのファイルはサーバ ++から削除されます。
++

最終ダウンロードから以下の日で公開満了になります:

++
++

ダウンロードした後、サーバでアップロードされたファイルを保持する時間を入力してください。 ++別なダウンロード操作があればチケットを消すまでの時間が延びます。この期間を何も操作なく超えると、 ++ファイルはサーバから削除されます。

++

この機能は、長い期間(何日とか、何週間とか)で使う時に使うことができ、使われるまで ++チケットを "有効" にすることができ、その後で自動的に削除されます。

++

短い期間(24時間以内など)で使うときは、ダウンロードされたすぐに、チケットを削除し、 ++ファイルを一度以上ダウンロードするための予備時間となります。

++
++

以下の回数のダウンロードで公開終了となります:

++
++アップロードされたファイルのダウンロードされる全体の回数を入力してください。 ++この回数になると、ファイルは、サーバから削除されます。 ++1人の人から1度ダウンロードされたかどうかを確認するには、便利です。
++

これらのパラメータの1つで公開解除となると、ファイルは削除されます。いくつかの ++パラメターを "0" にすると、条件は満たさなくなります。

++
++
++ ++ +diff -urN dl-0.18.1.old/htdocs/static/guide/nl_NL/index.html dl-0.18.1/htdocs/static/guide/nl_NL/index.html +--- dl-0.18.1.old/htdocs/static/guide/nl_NL/index.html 1970-01-01 01:00:00.000000000 +0100 ++++ dl-0.18.1/htdocs/static/guide/nl_NL/index.html 2017-09-06 17:09:38.000000000 +0100 +@@ -0,0 +1,474 @@ ++ ++ ++ ++ ++ ++ ++Download ticket service ++ ++ ++ ++
++

Download ticket service

++ ++
++

Inhoud

++ ++
++
++

Korte stap voor stap handleiding om attachments te versturen

++

Ga alleereerst naar https://dl.example.com/ en log in met uw gebruikersnaam en ++wachtwoord.

++

U ziet nu onderstaande pagina:

++t-step-1.png ++
    ++
  1. Klik op de knop "Bestand kiezen" (of "Browse") onder "Een bestand uploaden" ++zoals aangegeven op bovenstaand figuur. Selecteer vervolgens het bestand ++dat u wilt versturen.
  2. ++
  3. Klik op "Bestand uploaden" en wacht totdat het bestand is geüpload. Als het ++uploaden is gelukt verschijnt de volgende figuur:
  4. ++
++t-step-2.png ++
    ++
  1. Klik "Verstuurd per e-mail" om de e-mail naar de gewenste persoon te ++versturen. Deze mail bevat de link naar het bestand dat u zojuist heeft ++geüpload.
  2. ++
++

Standaard heeft de ontvanger één week de tijd om het bestand te downloaden ++voordat dit bestand automatisch verwijderd wordt. U kunt dit gedrag wijzigen ++door een aantal parameters in te stellen voordat u het bestand upload.

++

U kunt een lijst van bestanden die u heeft geüpload zien en wijzigen door op ++"Actieve tickets" onderaan de pagina te klikken.

++
++
++

Korte stap voor stap handleiding om attachments te ontvangen

++

Ga alleereerst naar https://dl.example.com/ en log in met uw gebruikersnaam en ++wachtwoord.

++

U ziet nu onderstaande pagina:

++g-step-1.png ++
    ++
  1. Klik op de "Nieuwe toekenning" link onderaan de pagina om een nieuwe ++toekenning te maken.
  2. ++
++g-step-2.png ++
    ++
  1. Vul uw eigen e-mail adres in.
  2. ++
  3. Klik op "Maak" om een upload toekenning te maken.
  4. ++
++g-step-3.png ++
    ++
  1. Klik op "Verstuurd per e-mail" om een e-mail naar iemand te versturen. Deze ++e-mail bevat een link die het de ontvanger mogelijk maakt om u een groot ++bestand terug te sturen.
  2. ++
++

Uw ontvanger hoeft alleen maar de instructies te volgen zoals aangegeven in de ++mail. Als de ontvanger van de link zijn bestand heeft geüpload naar de server ++ontvangt u een notificatie e-mail met daarin een link naar het geüploade ++bestand.

++
++
++

Geavanceerde upload parameters

++

Voordat u een bestand upload kunt u met geavancceerde parameters instellen hoe ++vaak het bestand gedownload kan worden en of en wanneer het bestand automatisch ++wordt verwijderd.

++t-advanced.png ++ ++

Vervalt na # dagen:

++
++Vul hier het maximaal aantal dagen in dat een geüpload bestand op de server ++blijft staan. Na deze periode wordt het bestand automatisch van de server ++verwijderd. Het maakt hierbij niet uit of het bestand wel of niet ++gedownload was tijdens het ingestelde tijdsinterval.
++

Vervalt na # dagen na de laatste download:

++
++

Vul hier het maximaal aantal dagen in dat een geüpload bestand op de server ++blijft staan nadat het gedownload is. Een volgende download zorgt ervoor ++dat de teller weer wordt gereset. Nadat het ingestelde aantal dagen is ++verstreken zonder dat er een download van het bestand heeft plaatsgevonden, ++zal het bestand automatisch van de server verwijderd worden.

++

Deze functie zorgt ervoor dat populaire bestanden bewaard blijven maar ++nadat deze is gezakt automatisch verwijderd worden. Het is aan ++te raden om het tijdsinterval in te stellen op meerdere dagen of weken.

++

Zorg er altijd voor dat u het tijdsinterval zodanig instelt dat een ++ontvanger van uw e-mail het bestand indien nodig twee keer kan downloaden.

++
++

Vervalt na # downloads:

++
++Vul het aantal keer in dat het geüploade bestand gedownload kan worden. Als ++het ingestelde aantal downloads bereikt is zal het bestand automatisch van ++de server verwijderd worden. Deze functie is handig als u er bijvoorbeeld ++zeker van wilt zijn dat uw bestand één keer gedownload wordt door één ++persoon.
++

Als één van bovenstaande ingestelde parameters verloopt dan zal het bestand ++verwijderd worden. Als u "0" invult bij een parameter dan zal deze ++uitgeschakeld worden.

++
++
++ ++ diff --git a/dl-0.18.1-pre0.19changes20210316.patch b/dl-0.18.1-pre0.19changes20210316.patch new file mode 100644 index 0000000..1d15ee9 --- /dev/null +++ b/dl-0.18.1-pre0.19changes20210316.patch @@ -0,0 +1,8560 @@ +diff -Nur dl-0.18.1/AUTHORS.html dl-master/AUTHORS.html +--- dl-0.18.1/AUTHORS.html 2017-09-06 12:09:38.000000000 -0400 ++++ dl-master/AUTHORS.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,467 +0,0 @@ +- +- +- +- +- +- +- +- +- +- +-
+- +- +-
+-

Main program

+-
+-
Copyright(c) 2007-2017 Yuri D'Elia <wavexx@thregr.org>
+-
License: GNU GPL 2+ (see COPYING)
+-
+-
+-
+-

Localization

+- +-+-+- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
Brazilian Portuguese:
 Guilherme Benkenstein <gb@gbti.com.br>
Czech:Jan Štětina <zaantar@gmail.com>
Dutch:Maarten Schoonman <m.s.schoonman@home.nl>
French:Daniel Berteaud <daniel@firewall-services.com>
German:Clemens Egger <clemens.egger@eurac.edu>
Italian:Yuri D'Elia <wavexx@thregr.org>
Japanese:Teruo IWAI <teruo.iwai@gmail.com>
Russian:Олейник О.В <oleg_oleinik@mail.ru>
Spanish:Roberto Salgado <drober@gmail.com>
Simplified Cinese:
 Guangyu Dong <skyerce@gmail.com>
+-
+-
+-

Bundled code

+- +-
+-
+-

Bundled media

+- +-
+-
+- +- +diff -Nur dl-0.18.1/AUTHORS.rst dl-master/AUTHORS.rst +--- dl-0.18.1/AUTHORS.rst 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/AUTHORS.rst 2021-03-16 18:59:58.000000000 -0400 +@@ -1,7 +1,7 @@ + Main program + ------------ + +-| Copyright(c) 2007-2017 Yuri D'Elia ++| Copyright(c) 2007-2021 Yuri D'Elia + | License: GNU GPL 2+ (see COPYING) + + Localization +@@ -24,9 +24,10 @@ + + * PHP-Gettext: + +- | Copyright(c) 2005 Steven Armstrong +- | Copyright(c) 2003, 2009 Danilo Segan ++ | Copyright(c) 2005-2006 Steven Armstrong ++ | Copyright(c) 2003-2009 Danilo Segan + | Copyright(c) 2005 Nico Kaiser ++ | Copyright(c) 2006 Marcelo Jorge Vieira + | License: GNU GPL 2+ (see COPYING) + | https://launchpad.net/php-gettext/ + +diff -Nur dl-0.18.1/client/dl-cli.py dl-master/client/dl-cli.py +--- dl-0.18.1/client/dl-cli.py 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/client/dl-cli.py 2021-03-16 18:59:58.000000000 -0400 +@@ -26,7 +26,7 @@ + import httplib + + +-DL_VERSION = "0.18" ++DL_VERSION = "0.19" + DL_AGENT = "dl-cli/" + DL_VERSION + + +@@ -69,7 +69,8 @@ + if not filename: + filename = os.path.basename(path) + c.setopt(c.HTTPPOST, [ +- ("file", (c.FORM_FILE, path, c.FORM_FILENAME, filename)), ++ ("file", (c.FORM_FILE, path.encode(sys.getfilesystemencoding()), ++ c.FORM_FILENAME, filename.encode('utf8'))), + ("msg", json.dumps({}))]) + + try: +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/en-US/compose.properties dl-master/client/thunderbird-filelink-dl/chrome/locale/en-US/compose.properties +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/en-US/compose.properties 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/en-US/compose.properties 2021-03-16 18:59:58.000000000 -0400 +@@ -1,4 +1,4 @@ +-accountNeededTitle=A DL account is required ++accountNeededTitle=A DL FileLink account is required + accountNeededMsg=Do you want to create an account now? + newGrantFailure=Cannot generate a new grant +-newGrantProgress=Requesting new grant... ++newGrantProgress=Requesting new grant… +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/en-US/management.dtd dl-master/client/thunderbird-filelink-dl/chrome/locale/en-US/management.dtd +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/en-US/management.dtd 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/en-US/management.dtd 2021-03-16 18:59:58.000000000 -0400 +@@ -1,4 +1,4 @@ +- ++ + + + +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/compose.dtd dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/compose.dtd +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/compose.dtd 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/compose.dtd 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1 @@ ++ +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/compose.properties dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/compose.properties +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/compose.properties 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/compose.properties 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,4 @@ ++accountNeededTitle=A DL-fájlhivatkozás fiók szükséges ++accountNeededMsg=Fiók létrehozása most? ++newGrantFailure=Nem lehet új támogatást létrehozni ++newGrantProgress=Új támogatás kérése… +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/management.dtd dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/management.dtd +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/management.dtd 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/management.dtd 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,5 @@ ++ ++ ++ ++ ++ +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/settings.dtd dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/settings.dtd +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome/locale/hu/settings.dtd 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/client/thunderbird-filelink-dl/chrome/locale/hu/settings.dtd 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,3 @@ ++ ++ ++ +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/chrome.manifest dl-master/client/thunderbird-filelink-dl/chrome.manifest +--- dl-0.18.1/client/thunderbird-filelink-dl/chrome.manifest 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/client/thunderbird-filelink-dl/chrome.manifest 2021-03-16 18:59:58.000000000 -0400 +@@ -1,6 +1,7 @@ + content thunderbird-filelink-dl chrome/content/ + skin thunderbird-filelink-dl default chrome/skin/ + locale thunderbird-filelink-dl en-US chrome/locale/en-US/ ++locale thunderbird-filelink-dl en-US chrome/locale/hu/ + + component {c0bee36d-3c0d-460b-bb9a-f0e9c873a833} components/nsDL.js + contract @thregr.org/thunderbird-filelink-dl;1 {c0bee36d-3c0d-460b-bb9a-f0e9c873a833} +Les fichiers binaires dl-0.18.1/client/thunderbird-filelink-dl/components/nsDL.xpt et dl-master/client/thunderbird-filelink-dl/components/nsDL.xpt sont différents +diff -Nur dl-0.18.1/client/thunderbird-filelink-dl/install.rdf dl-master/client/thunderbird-filelink-dl/install.rdf +--- dl-0.18.1/client/thunderbird-filelink-dl/install.rdf 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/client/thunderbird-filelink-dl/install.rdf 2021-03-16 18:59:58.000000000 -0400 +@@ -4,11 +4,13 @@ + + + thunderbird-filelink-dl@thregr.org +- DL for Thunderbird +- DL support for Thunderbird's Filelink ++ DL FileLink Provider for Thunderbird ++ Convert large attachments to links automatically, directly within the Composer window, using your own “DL” server/service instead of relying on 3rd-party providers + https://www.thregr.org/~wavexx/software/dl/ + Yuri D'Elia +- 0.17.2 ++ Yuri D'Elia (en-US) ++ Óvári (hu) ++ 0.17.3 + 2 + + +@@ -19,5 +21,17 @@ + 52.* + + ++ ++ ++ ++ ++ hu ++ A „DL” fájlhivatkozás szolgáltató a Thunderbird számára (DL FileLink Provider for Thunderbird) ++ Átalakítja a nagy mellékleteket önműködően az üzenetszerkesztő ablakban lévő hivatkozásoké, saját „DL” kiszolgálóéval/szolgáltatásával, a harmadik féltől származó szolgáltatókra való hivatkozás helyett ++ Yuri D'Elia (en-US) ++ Óvári (hu) ++ ++ ++ + + +Les fichiers binaires dl-0.18.1/client/thunderbird-filelink-dl.xpi et dl-master/client/thunderbird-filelink-dl.xpi sont différents +diff -Nur dl-0.18.1/.gitignore dl-master/.gitignore +--- dl-0.18.1/.gitignore 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/.gitignore 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,7 @@ ++*.mo ++*~ ++*.pyc ++.*.swp ++*.html ++/htdocs/include/config.php ++/htdocs/static/guide/*/*.html +diff -Nur dl-0.18.1/htdocs/include/basefuncs.php dl-master/htdocs/include/basefuncs.php +--- dl-0.18.1/htdocs/include/basefuncs.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/basefuncs.php 2021-03-16 18:59:58.000000000 -0400 +@@ -3,8 +3,17 @@ + + function returnBytes($val) + { ++ if(is_int($val)) return $val; ++ if(!strlen($val)) return 0; ++ ++ // parse suffix (if any) + $val = trim($val); +- $last = strtolower($val{strlen($val)-1}); ++ $last = strtolower($val[strlen($val)-1]); ++ if($last === (string)(int)$last || $last === ".") ++ return (int)$val; // no sfx ++ ++ // handle mulitiplier ++ $val = (int)substr($val, 0, -1); + switch($last) + { + case 'g': $val *= 1024; +diff -Nur dl-0.18.1/htdocs/include/config.php.dist dl-master/htdocs/include/config.php.dist +--- dl-0.18.1/htdocs/include/config.php.dist 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/config.php.dist 2021-03-16 18:59:58.000000000 -0400 +@@ -64,16 +64,16 @@ + //$maxSize = ini_get('upload_max_filesize'); + + // dateFmtShort: Date format as used in the listings. +-// See http://it2.php.net/manual/en/function.date.php for the ++// See http://php.net/manual/en/function.date.php for the + // format specification. Useful choices are: + // - "d/m/Y": day/month/year + // - "d/m/Y T": day/month/year timezone + //$dateFmtShort = "Y-m-d"; + + // dateFmtFull: Full date/time format as used in ticket/grant details. +-// See http://it2.php.net/manual/en/function.date.php for the ++// See http://php.net/manual/en/function.date.php for the + // format specification. +-//$dateFmtFull = "Y-m-d H:m:s T"; ++//$dateFmtFull = "Y-m-d H:i:s T"; + + // authRealm: Enables HTTP authentication + // When using HTTP authentication, you should set authRealm to the +diff -Nur dl-0.18.1/htdocs/include/confwrap.php dl-master/htdocs/include/confwrap.php +--- dl-0.18.1/htdocs/include/confwrap.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/confwrap.php 2021-03-16 18:59:58.000000000 -0400 +@@ -27,7 +27,7 @@ + if(!isset($gcLimit)) $gcLimit = 0; + if(!isset($defTimezone)) $defTimezone = @date_default_timezone_get(); + if(!isset($dateFmtShort)) $dateFmtShort = "Y-m-d"; +-if(!isset($dateFmtFull)) $dateFmtFull = "Y-m-d H:m:s T"; ++if(!isset($dateFmtFull)) $dateFmtFull = "Y-m-d H:i:s T"; + if(!isset($emailSubjectPrefix)) $emailSubjectPrefix = "[dl] "; + + // default style +@@ -103,7 +103,7 @@ + ); + + // constants +-$dlVersion = "0.18.1"; ++$dlVersion = "0.19"; + $schemaVersion = "0.18"; + $bannerUrl = 'https://www.thregr.org/~wavexx/software/dl/'; + $banner = 'dl ticket service' +diff -Nur dl-0.18.1/htdocs/include/dbfuncs.php dl-master/htdocs/include/dbfuncs.php +--- dl-0.18.1/htdocs/include/dbfuncs.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/dbfuncs.php 2021-03-16 18:59:58.000000000 -0400 +@@ -22,19 +22,19 @@ + { + case "sqlite": + // enforce foreign keys by default +- $ret = $this->exec('PRAGMA foreign_keys = ON'); ++ $this->exec('PRAGMA foreign_keys = ON'); + break; + + case "mysql": + // put MySQL into ANSI mode +- $ret = $this->exec('SET SQL_MODE = ANSI_QUOTES'); ++ $this->exec('SET SQL_MODE = ANSI'); + break; + } + } + + public function ping() + { +- try { return ($this->exec('SELECT 1') == 1); } ++ try { return (@$this->exec('SELECT 1') == 1); } + catch(PDOException $e) { return false; } + } + } +diff -Nur dl-0.18.1/htdocs/include/editgrants.php dl-master/htdocs/include/editgrants.php +--- dl-0.18.1/htdocs/include/editgrants.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/editgrants.php 2021-03-16 18:59:58.000000000 -0400 +@@ -97,7 +97,7 @@ + { + $addrs = array(); + foreach(getEMailAddrs($DATA['sent_email']) as $email) +- $addrs[] = '' . htmlEntUTF8($email) . ''; ++ $addrs[] = '' . htmlEntUTF8($email) . ''; + $details[T_("Initially sent to")] = implode(", ", $addrs); + } + +diff -Nur dl-0.18.1/htdocs/include/edittickets.php dl-master/htdocs/include/edittickets.php +--- dl-0.18.1/htdocs/include/edittickets.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/edittickets.php 2021-03-16 18:59:58.000000000 -0400 +@@ -76,7 +76,7 @@ + { + $addrs = array(); + foreach(getEMailAddrs($DATA['sent_email']) as $email) +- $addrs[] = '' . htmlEntUTF8($email) . ''; ++ $addrs[] = '' . htmlEntUTF8($email) . ''; + $details[T_("Initially sent to")] = implode(", ", $addrs); + } + +diff -Nur dl-0.18.1/htdocs/include/funcs.php dl-master/htdocs/include/funcs.php +--- dl-0.18.1/htdocs/include/funcs.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/funcs.php 2021-03-16 18:59:58.000000000 -0400 +@@ -308,12 +308,12 @@ + + function tokenUrl($url, $params = array()) + { +- $url .= '?token=' . urlencode($_SESSION['token']); ++ $url .= '?token=' . rawurlencode($_SESSION['token']); + foreach($params as $k => $v) + { +- $url .= '&' . urlencode($k); ++ $url .= '&' . rawurlencode($k); + if(!is_null($v)) +- $url .= '=' . urlencode($v); ++ $url .= '=' . rawurlencode($v); + } + return $url; + } +@@ -359,7 +359,7 @@ + + foreach($v['funcs'] as $i) + { +- if(!call_user_func($i, $p)) ++ if(!call_user_func_array($i, array(&$p))) + { + $error = true; + unset($array[$k]); +@@ -545,16 +545,25 @@ + else + { + $zip = new ZipArchive(); +- if($zip->open($tmpFile, ZipArchive::CREATE) !== true) ++ if($zip->open($tmpFile, ZipArchive::CREATE|ZipArchive::OVERWRITE) !== true) ++ { ++ logError("cannot create ZIP file $tmpFile"); + goto error; ++ } + foreach($FILES as $FILE) + { + $name = uniqueFileName(mb_sane_base($FILE["name"]), $files); + if(!$zip->addFile($FILE["tmp_name"], $name)) ++ { ++ logError("cannot add file " . $FILE["tmp_name"] . " to $tmpFile"); + goto error; ++ } + } + if(!$zip->close()) ++ { ++ logError("cannot close ZIP file $tmpFile"); + goto error; ++ } + $name = "Archive-" . date("Y-m-d") . ".zip"; + $size = filesize($tmpFile); + } +diff -Nur dl-0.18.1/htdocs/include/.htaccess dl-master/htdocs/include/.htaccess +--- dl-0.18.1/htdocs/include/.htaccess 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/.htaccess 2021-03-16 18:59:58.000000000 -0400 +@@ -1,4 +1,9 @@ + +- Order allow,deny +- Deny from all ++ = 2.4> ++ Require all denied ++ ++ ++ Order allow,deny ++ Deny from all ++ + +diff -Nur dl-0.18.1/htdocs/include/init.php dl-master/htdocs/include/init.php +--- dl-0.18.1/htdocs/include/init.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/init.php 2021-03-16 18:59:58.000000000 -0400 +@@ -21,6 +21,8 @@ + $ret = $logFd = fopen($logFile, "at"); + if(@$ret === false) + die("cannot initialize logging\n"); ++else ++ ini_set('display_errors', 0); + + // initialize the db + connectDB(); +diff -Nur dl-0.18.1/htdocs/include/lang.php dl-master/htdocs/include/lang.php +--- dl-0.18.1/htdocs/include/lang.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/lang.php 2021-03-16 18:59:58.000000000 -0400 +@@ -71,9 +71,11 @@ + { + global $helpPath, $helpRoot, $masterPath, $defLocale, $incPath; + +- T_setlocale(LC_ALL, $locale . ".utf8"); +- T_bindtextdomain('messages', "$incPath/locale"); +- T_textdomain('messages'); ++ $domain = 'messages'; ++ T_setlocale(LC_ALL, $locale); ++ T_bindtextdomain($domain, "$incPath/locale"); ++ T_bind_textdomain_codeset($domain, 'UTF-8'); ++ T_textdomain($domain); + + if(file_exists("$helpRoot/$locale")) + $helpPath = "$masterPath$helpRoot/$locale/"; +diff -Nur dl-0.18.1/htdocs/include/lib/gettext/gettext.inc dl-master/htdocs/include/lib/gettext/gettext.inc +--- dl-0.18.1/htdocs/include/lib/gettext/gettext.inc 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/lib/gettext/gettext.inc 2021-03-16 18:59:58.000000000 -0400 +@@ -32,7 +32,6 @@ + LC_ALL 6 + */ + +- + // LC_MESSAGES is not available if php-gettext is not loaded + // while the other constants are already available from session extension. + if (!defined('LC_MESSAGES')) { +@@ -175,14 +174,13 @@ + * Convert the given string to the encoding set by bind_textdomain_codeset. + */ + function _encode($text) { ++ $target_encoding = _get_codeset(); ++ if (function_exists("mb_detect_encoding")) { + $source_encoding = mb_detect_encoding($text); +- $target_encoding = _get_codeset(); +- if ($source_encoding != $target_encoding) { +- return mb_convert_encoding($text, $target_encoding, $source_encoding); +- } +- else { +- return $text; +- } ++ if ($source_encoding != $target_encoding) ++ $text = mb_convert_encoding($text, $target_encoding, $source_encoding); ++ } ++ return $text; + } + + +@@ -229,7 +227,9 @@ + } + // Allow locale to be changed on the go for one translation domain. + global $text_domains, $default_domain; +- unset($text_domains[$default_domain]->l10n); ++ if (array_key_exists($default_domain, $text_domains)) { ++ unset($text_domains[$default_domain]->l10n); ++ } + return $CURRENTLOCALE; + } + } +@@ -288,9 +288,9 @@ + /** + * Plural version of gettext. + */ +-function _ngettext($single, $plural, $number) { ++function _ngettext($singular, $plural, $number) { + $l10n = _get_reader(); +- return _encode($l10n->ngettext($single, $plural, $number)); ++ return _encode($l10n->ngettext($singular, $plural, $number)); + } + + /** +@@ -304,9 +304,9 @@ + /** + * Plural version of dgettext. + */ +-function _dngettext($domain, $single, $plural, $number) { ++function _dngettext($domain, $singular, $plural, $number) { + $l10n = _get_reader($domain); +- return _encode($l10n->ngettext($single, $plural, $number)); ++ return _encode($l10n->ngettext($singular, $plural, $number)); + } + + /** +@@ -319,9 +319,9 @@ + /** + * Plural version of dcgettext. + */ +-function _dcngettext($domain, $single, $plural, $number, $category) { ++function _dcngettext($domain, $singular, $plural, $number, $category) { + $l10n = _get_reader($domain, $category); +- return _encode($l10n->ngettext($single, $plural, $number)); ++ return _encode($l10n->ngettext($singular, $plural, $number)); + } + + /** +@@ -405,29 +405,29 @@ + if (_check_locale_and_function()) return _($msgid); + return __($msgid); + } +-function T_ngettext($single, $plural, $number) { ++function T_ngettext($singular, $plural, $number) { + if (_check_locale_and_function()) +- return ngettext($single, $plural, $number); +- else return _ngettext($single, $plural, $number); ++ return ngettext($singular, $plural, $number); ++ else return _ngettext($singular, $plural, $number); + } + function T_dgettext($domain, $msgid) { + if (_check_locale_and_function()) return dgettext($domain, $msgid); + else return _dgettext($domain, $msgid); + } +-function T_dngettext($domain, $single, $plural, $number) { ++function T_dngettext($domain, $singular, $plural, $number) { + if (_check_locale_and_function()) +- return dngettext($domain, $single, $plural, $number); +- else return _dngettext($domain, $single, $plural, $number); ++ return dngettext($domain, $singular, $plural, $number); ++ else return _dngettext($domain, $singular, $plural, $number); + } + function T_dcgettext($domain, $msgid, $category) { + if (_check_locale_and_function()) + return dcgettext($domain, $msgid, $category); + else return _dcgettext($domain, $msgid, $category); + } +-function T_dcngettext($domain, $single, $plural, $number, $category) { ++function T_dcngettext($domain, $singular, $plural, $number, $category) { + if (_check_locale_and_function()) +- return dcngettext($domain, $single, $plural, $number, $category); +- else return _dcngettext($domain, $single, $plural, $number, $category); ++ return dcngettext($domain, $singular, $plural, $number, $category); ++ else return _dcngettext($domain, $singular, $plural, $number, $category); + } + + function T_pgettext($context, $msgid) { +@@ -451,26 +451,27 @@ + return _dcpgettext($domain, $context, $msgid, $category); + } + +-function T_npgettext($context, $singular, $plural) { ++function T_npgettext($context, $singular, $plural, $number) { + if (_check_locale_and_function('npgettext')) +- return npgettext($context, $single, $plural, $number); ++ return npgettext($context, $singular, $plural, $number); + else +- return _npgettext($context, $single, $plural, $number); ++ return _npgettext($context, $singular, $plural, $number); + } + +-function T_dnpgettext($domain, $context, $singular, $plural) { ++function T_dnpgettext($domain, $context, $singular, $plural, $number) { + if (_check_locale_and_function('dnpgettext')) +- return dnpgettext($domain, $context, $single, $plural, $number); ++ return dnpgettext($domain, $context, $singular, $plural, $number); + else +- return _dnpgettext($domain, $context, $single, $plural, $number); ++ return _dnpgettext($domain, $context, $singular, $plural, $number); + } + +-function T_dcnpgettext($domain, $context, $singular, $plural, $category) { ++function T_dcnpgettext($domain, $context, $singular, $plural, ++ $number, $category) { + if (_check_locale_and_function('dcnpgettext')) +- return dcnpgettext($domain, $context, $single, ++ return dcnpgettext($domain, $context, $singular, + $plural, $number, $category); + else +- return _dcnpgettext($domain, $context, $single, ++ return _dcnpgettext($domain, $context, $singular, + $plural, $number, $category); + } + +@@ -494,39 +495,39 @@ + function _($msgid) { + return __($msgid); + } +- function ngettext($single, $plural, $number) { +- return _ngettext($single, $plural, $number); ++ function ngettext($singular, $plural, $number) { ++ return _ngettext($singular, $plural, $number); + } + function dgettext($domain, $msgid) { + return _dgettext($domain, $msgid); + } +- function dngettext($domain, $single, $plural, $number) { +- return _dngettext($domain, $single, $plural, $number); ++ function dngettext($domain, $singular, $plural, $number) { ++ return _dngettext($domain, $singular, $plural, $number); + } + function dcgettext($domain, $msgid, $category) { + return _dcgettext($domain, $msgid, $category); + } +- function dcngettext($domain, $single, $plural, $number, $category) { +- return _dcngettext($domain, $single, $plural, $number, $category); ++ function dcngettext($domain, $singular, $plural, $number, $category) { ++ return _dcngettext($domain, $singular, $plural, $number, $category); + } + function pgettext($context, $msgid) { + return _pgettext($context, $msgid); + } +- function npgettext($context, $single, $plural, $number) { +- return _npgettext($context, $single, $plural, $number); ++ function npgettext($context, $singular, $plural, $number) { ++ return _npgettext($context, $singular, $plural, $number); + } + function dpgettext($domain, $context, $msgid) { + return _dpgettext($domain, $context, $msgid); + } +- function dnpgettext($domain, $context, $single, $plural, $number) { +- return _dnpgettext($domain, $context, $single, $plural, $number); ++ function dnpgettext($domain, $context, $singular, $plural, $number) { ++ return _dnpgettext($domain, $context, $singular, $plural, $number); + } + function dcpgettext($domain, $context, $msgid, $category) { + return _dcpgettext($domain, $context, $msgid, $category); + } +- function dcnpgettext($domain, $context, $single, $plural, ++ function dcnpgettext($domain, $context, $singular, $plural, + $number, $category) { +- return _dcnpgettext($domain, $context, $single, $plural, ++ return _dcnpgettext($domain, $context, $singular, $plural, + $number, $category); + } + } +diff -Nur dl-0.18.1/htdocs/include/lib/gettext/gettext.php dl-master/htdocs/include/lib/gettext/gettext.php +--- dl-0.18.1/htdocs/include/lib/gettext/gettext.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/lib/gettext/gettext.php 2021-03-16 18:59:58.000000000 -0400 +@@ -21,6 +21,8 @@ + + */ + ++require('plurals.php'); ++ + /** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. +@@ -270,41 +272,6 @@ + } + + /** +- * Sanitize plural form expression for use in PHP eval call. +- * +- * @access private +- * @return string sanitized plural form expression +- */ +- function sanitize_plural_expression($expr) { +- // Get rid of disallowed characters. +- $expr = preg_replace('@[^a-zA-Z0-9_:;\(\)\?\|\&=!<>+*/\%-]@', '', $expr); +- +- // Add parenthesis for tertiary '?' operator. +- $expr .= ';'; +- $res = ''; +- $p = 0; +- for ($i = 0; $i < strlen($expr); $i++) { +- $ch = $expr[$i]; +- switch ($ch) { +- case '?': +- $res .= ' ? ('; +- $p++; +- break; +- case ':': +- $res .= ') : ('; +- break; +- case ';': +- $res .= str_repeat( ')', $p) . ';'; +- $p = 0; +- break; +- default: +- $res .= $ch; +- } +- } +- return $res; +- } +- +- /** + * Parse full PO header and extract only plural forms line. + * + * @access private +@@ -330,14 +297,14 @@ + $this->load_tables(); + + // cache header field for plural forms +- if (! is_string($this->pluralheader)) { ++ if ($this->pluralheader === NULL) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + $expr = $this->extract_plural_forms_header_from_po_header($header); +- $this->pluralheader = $this->sanitize_plural_expression($expr); ++ $this->pluralheader = new PluralHeader($expr); + } + return $this->pluralheader; + } +@@ -350,16 +317,16 @@ + * @return int array index of the right plural form + */ + function select_string($n) { +- $string = $this->get_plural_forms(); +- $string = str_replace('nplurals',"\$total",$string); +- $string = str_replace("n",$n,$string); +- $string = str_replace('plural',"\$plural",$string); ++ if (!is_int($n)) { ++ throw new InvalidArgumentException( ++ "Select_string only accepts integers: " . $n); ++ } ++ $plural_header = $this->get_plural_forms(); ++ $plural = $plural_header->expression->evaluate($n); + +- $total = 0; +- $plural = 0; ++ if ($plural < 0) $plural = 0; ++ if ($plural >= $plural_header->total) $plural = $plural_header->total - 1; + +- eval("$string"); +- if ($plural >= $total) $plural = $total - 1; + return $plural; + } + +@@ -409,12 +376,23 @@ + + function pgettext($context, $msgid) { + $key = $context . chr(4) . $msgid; +- return $this->translate($key); ++ $ret = $this->translate($key); ++ if (strpos($ret, "\004") !== FALSE) { ++ return $msgid; ++ } else { ++ return $ret; ++ } + } + + function npgettext($context, $singular, $plural, $number) { +- $singular = $context . chr(4) . $singular; +- return $this->ngettext($singular, $plural, $number); ++ $key = $context . chr(4) . $singular; ++ $ret = $this->ngettext($key, $plural, $number); ++ if (strpos($ret, "\004") !== FALSE) { ++ return $singular; ++ } else { ++ return $ret; ++ } ++ + } + } + +diff -Nur dl-0.18.1/htdocs/include/lib/gettext/plurals.php dl-master/htdocs/include/lib/gettext/plurals.php +--- dl-0.18.1/htdocs/include/lib/gettext/plurals.php 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/htdocs/include/lib/gettext/plurals.php 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,461 @@ ++ ++ ++ Drop in replacement for native gettext. ++ ++ This file is part of PHP-gettext. ++ ++ PHP-gettext is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ PHP-gettext is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with PHP-gettext; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++*/ ++ ++/** ++ * Lexical analyzer for gettext plurals expression. Takes a string to parse ++ * during construction and returns a single token every time peek() or ++ * fetch_token() are called. The special string '__END__' is returned if there ++ * are no more tokens to be read. Spaces are ignored during tokenization. ++ */ ++class PluralsLexer { ++ private $string; ++ private $position; ++ ++ /** ++ * Constructor ++ * ++ * @param string string Contains the value gettext plurals expression to ++ * analyze. ++ */ ++ public function __construct(string $string) { ++ $this->string = $string; ++ $this->position = 0; ++ } ++ ++ /** ++ * Return the next token and the length to advance the read position without ++ * actually advancing the read position. Tokens for operators and variables ++ * are simple strings containing the operator or variable. If there are no ++ * more token to provide, the special value ['__END__', 0] is returned. If ++ * there was an unexpected input an Exception is raised. ++ * ++ * @access private ++ * @throws Exception If there is unexpected input in the provided string. ++ * @return array The next token and length to advance the current position. ++ */ ++ private function _tokenize() { ++ $buf = $this->string; ++ ++ // Consume all spaces until the next token ++ $index = $this->position; ++ while ($index < strlen($buf) && $buf[$index] == ' ') { ++ $index++; ++ } ++ $this->position = $index; ++ ++ // Return special token if next of the string is reached. ++ if (strlen($buf) - $index == 0) { ++ return ['__END__', 0]; ++ } ++ ++ // Operators with two characters ++ $doubles = ['==', '!=', '>=', '<=', '&&', '||']; ++ $next = substr($buf, $index, 2); ++ if (in_array($next, $doubles)) { ++ return [$next, 2]; ++ } ++ ++ // Operators with single character or variable 'n'. ++ $singles = [ ++ 'n', '(', ')', '?', ':', '+', '-', '*', '/', '%', '!', '>', '<']; ++ if (in_array($buf[$index], $singles)) { ++ return [$buf[$index], 1]; ++ } ++ ++ // Whole number constants, return an integer. ++ $digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; ++ $pos = $index; ++ while ($pos < strlen($buf) && in_array($buf[$pos], $digits)) { ++ $pos++; ++ } ++ if ($pos != $index) { ++ $length = $pos - $index; ++ return [(int)substr($buf, $index, $length), $length]; ++ } ++ ++ // Throw and exception for all other unexpected input in the string. ++ throw new Exception('Lexical analysis failed'); ++ } ++ ++ /** ++ * Return the next token without actually advancing the read position. ++ * Tokens for operators and variables are simple strings containing the ++ * operator or variable. If there are no more tokens to provide, the special ++ * value '__END__' is returned. If there was an unexpected input an ++ * Exception is raised. ++ * ++ * @throws Exception If there is unexpected input in the provided string. ++ * @return string The next token. ++ */ ++ public function peek() { ++ list($token, $length) = $this->_tokenize(); ++ return $token; ++ } ++ ++ /** ++ * Return the next token after advancing the read position. Tokens for ++ * operators and variables are simple strings containing the operator or ++ * variable. If there are no more token to provide, the special value ++ * '__END__' is returned. If there was an unexpected input an Exception is ++ * raised. ++ * ++ * @throws Exception If there is unexpected input in the provided string. ++ * @return string The next token. ++ */ ++ public function fetch_token() { ++ list($token, $length) = $this->_tokenize(); ++ $this->position += $length; ++ return $token; ++ } ++} ++ ++/** ++ * A parsed representation of the gettext plural expression. This is a tree ++ * containing further expressions depending on how nested the given input is. ++ * Calling the evaluate() function computes the value of the expression if the ++ * variable 'n' is set a certain value. This is used to decide which plural ++ * string translation to use based on the number items at hand. ++ */ ++class PluralsExpression { ++ private $operator; ++ private $operands; ++ ++ const BINARY_OPERATORS = [ ++ '==', '!=', '>=', '<=', '&&', '||', '+', '-', '*', '/', '%', '>', '<']; ++ const UNARY_OPERATORS = ['!']; ++ ++ /** ++ * Constructor ++ * ++ * @param string Operator for the expression. ++ * @param (int|string|PuralsExpression)[] Variable number of operands of the ++ * expression. One int operand is expected in case the operator is 'const'. ++ * One string operand with value 'n' is expected in case the operator is ++ * 'var'. For all other operators, the operands much be objects of type ++ * PluralExpression. Unary operators expect one operand, binary operators ++ * expect two operands and trinary operators expect three operands. ++ */ ++ public function __construct($operator, ...$operands) { ++ $this->operator = $operator; ++ $this->operands = $operands; ++ } ++ ++ /** ++ * Return a parenthesized string representation of the expression for ++ * debugging purposes. ++ * ++ * @return string A string representation of the expression. ++ */ ++ public function to_string() { ++ if ($this->operator == 'const' || $this->operator == 'var') { ++ return $this->operands[0]; ++ } elseif (in_array($this->operator, self::BINARY_OPERATORS)) { ++ return sprintf( ++ "(%s %s %s)", $this->operands[0]->to_string(), $this->operator, ++ $this->operands[1]->to_string()); ++ } elseif (in_array($this->operator, self::UNARY_OPERATORS)) { ++ return sprintf( ++ "(%s %s)", $this->operator, $this->operands[0]->to_string()); ++ } elseif ($this->operator == '?') { ++ return sprintf( ++ "(%s ? %s : %s)", $this->operands[0]->to_string(), ++ $this->operands[1]->to_string(), ++ $this->operands[2]->to_string()); ++ } ++ } ++ ++ /** ++ * Return the computed value of the expression if the variable 'n' is set to ++ * a certain value. ++ * ++ * @param int The value of the variable n to use when evaluating. ++ * @throws Exception If the expression has been constructed incorrectly. ++ * @return int The value of the expression after evaluation. ++ */ ++ public function evaluate($n) { ++ if (!in_array($this->operator, ['const', 'var'])) { ++ $operand1 = $this->operands[0]->evaluate($n); ++ } ++ if (in_array($this->operator, self::BINARY_OPERATORS) || ++ $this->operator == '?') { ++ $operand2 = $this->operands[1]->evaluate($n); ++ } ++ if ($this->operator == '?') { ++ $operand3 = $this->operands[2]->evaluate($n); ++ } ++ ++ switch ($this->operator) { ++ case 'const': ++ return $this->operands[0]; ++ case 'var': ++ return $n; ++ case '!': ++ return !($operand1); ++ case '==': ++ return $operand1 == $operand2; ++ case '!=': ++ return $operand1 != $operand2; ++ case '>=': ++ return $operand1 >= $operand2; ++ case '<=': ++ return $operand1 <= $operand2; ++ case '>': ++ return $operand1 > $operand2; ++ case '<': ++ return $operand1 < $operand2; ++ case '&&': ++ return $operand1 && $operand2; ++ case '||': ++ return $operand1 || $operand2; ++ case '+': ++ return $operand1 + $operand2; ++ case '-': ++ return $operand1 - $operand2; ++ case '*': ++ return $operand1 * $operand2; ++ case '/': ++ return (int)($operand1 / $operand2); ++ case '%': ++ return $operand1 % $operand2; ++ case '?': ++ return $operand1 ? $operand2 : $operand3; ++ default: ++ throw new Exception('Invalid expression'); ++ } ++ } ++} ++ ++/** ++ * A simple operator-precedence parser for gettext plural expressions. Takes a ++ * string during construction and returns a PluralsExpression tree when ++ * parse() is called. ++ */ ++class PluralsParser { ++ private $lexer; ++ ++ /* ++ * Operator precedence. The parsing only happens with minimum precedence of ++ * 0. However, ':' and ')' exist here to make sure that parsing does not ++ * proceed beyond them when they are not to be parsed. ++ */ ++ private const PREC = [ ++ ':' => -1, '?' => 0, '||' => 1, '&&' => 2, '==' => 3, '!=' => 3, ++ '>' => 4, '<' => 4, '>=' => 4, '<=' => 4, '+' => 5, '-' => 5, '*' => 6, ++ '/' => 6, '%' => 6, '!' => 7, '__END__' => -1, ')' => -1 ++ ]; ++ ++ // List of right associative operators ++ private const RIGHT_ASSOC = ['?']; ++ ++ /** ++ * Constructor ++ * ++ * @param string string the plural expression to be parsed. ++ */ ++ public function __construct(string $string) { ++ $this->lexer = new PluralsLexer($string); ++ } ++ ++ /** ++ * Expect a primary next for parsing and return a PluralsExpression or throw ++ * and exception otherwise. A primary can be the variable 'n', an whole ++ * number constant, a unary operator expression string with '!', or a ++ * parenthesis expression. ++ * ++ * @throws Exception If the next token is not a primary or if parenthesis ++ * expression is not closes properly with ')'. ++ * @return PluralsExpression That is constructed from the parsed primary. ++ */ ++ private function _parse_primary() { ++ $token = $this->lexer->fetch_token(); ++ if ($token === 'n') { ++ return new PluralsExpression('var', 'n'); ++ } elseif (is_int($token)) { ++ return new PluralsExpression('const', (int)$token); ++ } elseif ($token === '!') { ++ return new PluralsExpression('!', $this->_parse_primary()); ++ } elseif ($token === '(') { ++ $result = $this->_parse($this->_parse_primary(), 0); ++ if ($this->lexer->fetch_token() != ')') { ++ throw new Exception('Mismatched parenthesis'); ++ } ++ return $result; ++ } ++ ++ throw new Exception('Primary expected'); ++ } ++ ++ /** ++ * Fetch an operator from the lexical analyzer and test for it. Optionally ++ * advance the position of the lexical analyzer to next token. Raise ++ * exception if the token retrieved is not an operator. ++ * ++ * @access private ++ * @param bool peek A flag to indicate whether the position of the lexical ++ * analyzer should *not* be advanced. If false, the lexical analyzer is ++ * advanced by one token. ++ * @throws Exception If the token read is not an operator. ++ * @return string The operator that has been fetched from the lexical ++ * analyzer. ++ */ ++ private function _parse_operator($peek) { ++ if ($peek) { ++ $token = $this->lexer->peek(); ++ } else { ++ $token = $this->lexer->fetch_token(); ++ } ++ ++ if ($token !== NULL && !array_key_exists($token, self::PREC)) { ++ throw new Exception('Operator expected'); ++ } ++ return $token; ++ } ++ ++ /** ++ * A parsing method suitable for recursion. ++ * ++ * @access private ++ * @param ParserExpression left_side A pre-parsed left-hand side expression ++ * of the file expression to be constructed. This helps with recursion. ++ * @param int min_precedence The minimum value of precedence for the ++ * operators to be considered for parsing. Parsing will stop and current ++ * expression is returned if an operator of a lower precedence is ++ * encountered. ++ * @throws Exception If the input string does not conform to the grammar of ++ * the gettext plural expression. ++ * @return ParserExpression A complete expression after parsing. ++ */ ++ private function _parse($left_side, $min_precedence) { ++ $next_token = $this->_parse_operator(true); ++ ++ while (self::PREC[$next_token] >= $min_precedence) { ++ $operator = $this->_parse_operator(false); ++ $right_side = $this->_parse_primary(); ++ ++ $next_token = $this->_parse_operator(true); ++ ++ /* ++ * Consume (recursively) into right hand side all expressions of higher ++ * precedence. ++ */ ++ while ((self::PREC[$operator] < self::PREC[$next_token]) || ++ ((self::PREC[$operator] == self::PREC[$next_token]) && ++ in_array($operator, self::RIGHT_ASSOC))) { ++ $right_side = $this->_parse( ++ $right_side, self::PREC[$next_token]); ++ $next_token = $this->_parse_operator(true); ++ } ++ ++ if ($operator != '?') { ++ /* ++ * Handling for all binary operators. Consume into left hand side all ++ * expressions of equal precedence. ++ */ ++ $left_side = new PluralsExpression($operator, $left_side, $right_side); ++ } else { ++ // Special handling for (a ? b : c) expression ++ $operator = $this->lexer->fetch_token(); ++ if ($operator != ':') { ++ throw new Exception('Invalid ? expression'); ++ } ++ ++ $right_side2 = $this->_parse( ++ $this->_parse_primary(), self::PREC[$operator] + 1); ++ $next_token = $this->_parse_operator(true); ++ $left_side = new PluralsExpression( ++ '?', $left_side, $right_side, $right_side2); ++ } ++ } ++ return $left_side; ++ } ++ ++ /** ++ * A simple implementation of an operator-precedence parser. See: ++ * https://en.wikipedia.org/wiki/Operator-precedence_parser for an analysis ++ * of the algorithm. ++ * ++ * @throws Exception If the input string does not conform to the grammar of ++ * the gettext plural expression. ++ * @return ParserExpression A complete expression after parsing. ++ */ ++ public function parse() { ++ $expression = $this->_parse($this->_parse_primary(), 0); ++ // Special handling for an extra ')' at the end. ++ if ($this->lexer->peek() != '__END__') { ++ throw new Exception('Could not parse completely'); ++ } ++ return $expression; ++ } ++} ++ ++/** ++ * Provides a class to parse the value of the 'Plural-Forms:' header in the ++ * gettext translation files. Holds the expression tree and the number of ++ * plurals after parsing. Parsing happens during construction which takes as ++ * its only argument the string to parse. Error during parsing are silently ++ * suppressed and the fallback behavior is used with the value for Germanic ++ * languages as follows: "nplurals=2; plural=n == 1 ? 0 : 1;". ++ */ ++class PluralHeader { ++ public $total; ++ public $expression; ++ ++ /** ++ * Constructor ++ * ++ * @param string The value of the Plural-Forms: header as seen in .po files. ++ */ ++ function __construct($string) { ++ try { ++ list($total, $expression) = $this->parse($string); ++ } catch (Exception $e) { ++ $string = "nplurals=2; plural=n == 1 ? 0 : 1;"; ++ list($total, $expression) = $this->parse($string); ++ } ++ $this->total = $total; ++ $this->expression = $expression; ++ } ++ ++ /** ++ * Return the number of plural forms and the parsed expression tree. ++ * ++ * @access private ++ * @param string string The value of the Plural-Forms: header. ++ * @throws Exception If the string could not be parsed. ++ * @return array The number of plural forms and parsed expression tree. ++ */ ++ private function parse($string) { ++ $regex = "/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural\s*=([^;]+);/i"; ++ if (preg_match($regex, $string, $matches)) { ++ $total = (int)$matches[1]; ++ $expression_string = $matches[2]; ++ } else { ++ throw new Exception('Invalid header value'); ++ } ++ ++ $parser = new PluralsParser($expression_string); ++ $expression = $parser->parse(); ++ return [$total, $expression]; ++ } ++} +Les fichiers binaires dl-0.18.1/htdocs/include/locale/cs_CZ/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/cs_CZ/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/de_DE/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/de_DE/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/es_ES/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/es_ES/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/fr_FR/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/fr_FR/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/it_IT/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/it_IT/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/ja_JP/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/ja_JP/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/nl_NL/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/nl_NL/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/pt_BR/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/pt_BR/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/ru_RU/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/ru_RU/LC_MESSAGES/messages.mo sont différents +Les fichiers binaires dl-0.18.1/htdocs/include/locale/zh_CN/LC_MESSAGES/messages.mo et dl-master/htdocs/include/locale/zh_CN/LC_MESSAGES/messages.mo sont différents +diff -Nur dl-0.18.1/htdocs/include/msg.php dl-master/htdocs/include/msg.php +--- dl-0.18.1/htdocs/include/msg.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/msg.php 2021-03-16 18:59:58.000000000 -0400 +@@ -5,6 +5,7 @@ + { + global $emailSubjectPrefix; + $subject = $emailSubjectPrefix . sprintf(T_("download link to %s"), $DATA['name']); ++ $body = ""; + if(!empty($DATA['cmt'])) + $body .= T_("Ticket comment:") . " " . $DATA['cmt'] . ".\n\n"; + $body .= T_("URL:") . " " . ticketUrl($DATA) . "\n"; +@@ -44,6 +45,7 @@ + { + global $emailSubjectPrefix; + $subject = $emailSubjectPrefix . T_("upload grant link"); ++ $body = ""; + if(!empty($DATA['cmt'])) + $body .= T_("Grant comment:") . " " . $DATA['cmt'] . ".\n\n"; + $body .= T_("URL:") . " " . grantUrl($DATA) . "\n"; +@@ -73,7 +75,7 @@ + global $dateFmtShort, $emailSubjectPrefix; + $subject = $emailSubjectPrefix . sprintf(T_("download link for grant %s"), grantStr($GRANT)); + $body = sprintf(T_("Your grant %s has been used on %s by %s."), +- grantStr($GRANT), date($dateFmtShort, $GRANT["time"]), ++ grantStr($GRANT), date($dateFmtShort, $GRANT["last_stamp"]), + $_SERVER["REMOTE_ADDR"]) . "\n"; + if(!empty($GRANT['cmt'])) + $body .= T_("Grant comment:") . " " . $GRANT['cmt'] . ".\n\n"; +diff -Nur dl-0.18.1/htdocs/include/newgrantr.php dl-master/htdocs/include/newgrantr.php +--- dl-0.18.1/htdocs/include/newgrantr.php 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/include/newgrantr.php 2021-03-16 18:59:58.000000000 -0400 +@@ -12,13 +12,14 @@ +
+ +-

+-

++ ++

++ " . T_("The required password is:") . " " +- . htmlEntUTF8($DATA['pass']) . "

"; ++ . htmlEntUTF8($DATA['pass']) . "

"; + } + + if($DATA['sent_email']) +@@ -27,18 +28,18 @@ + $addrs = getEMailAddrs($DATA['sent_email']); + foreach($addrs as &$addr) + { +- $addr = '' +- . htmlentities($addr) . ''; ++ $addr = '' ++ . htmlentities($addr) . ''; + } + echo join(', ', $addrs); + echo '

'; + } +-?> ++ ?> +
+ + ++ "/> + "/> +- "/> + + + + +-

+-

++ ++

++ " . T_("The required password is:") . " " +- . htmlEntUTF8($DATA['pass']) . "

"; ++ . htmlEntUTF8($DATA['pass']) . "

"; + } + + if($DATA['sent_email']) +@@ -27,18 +28,18 @@ + $addrs = getEMailAddrs($DATA['sent_email']); + foreach($addrs as &$addr) + { +- $addr = '' +- . htmlentities($addr) . ''; ++ $addr = '' ++ . htmlentities($addr) . ''; + } + echo join(', ', $addrs); + echo '

'; + } +-?> ++ ?> + + + ++ "/> + "/> +- "/> + + + " . htmlEntUTF8($DATA['name']) . ""; + echo ""; ++ . " type=\"password\" name=\"pass[]\">"; + + // role + echo '' +diff -Nur dl-0.18.1/htdocs/static/dl.js dl-master/htdocs/static/dl.js +--- dl-0.18.1/htdocs/static/dl.js 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/static/dl.js 2021-03-16 18:59:58.000000000 -0400 +@@ -117,6 +117,28 @@ + } + + ++// clipboard related ++function copyToClipboard(str) ++{ ++ if('queryCommandSupported' in document && document.queryCommandSupported("copy")) ++ { ++ // the "proper" way ++ var el = document.createElement('textarea'); ++ el.value = str; ++ document.body.appendChild(el); ++ el.focus(); ++ el.setSelectionRange(0, str.length); ++ document.execCommand('copy'); ++ document.body.removeChild(el); ++ } ++ else if("clipboardData" in window) ++ { ++ // the way it *should* be ++ window.clipboardData.setData('Text', str); ++ } ++} ++ ++ + // UI/form + function toggleAdvanced(set) + { +@@ -238,6 +260,7 @@ + + // replace current document with response + document.documentElement.innerHTML = ev.target.response; ++ window.scrollTo(0, 0); + $.cache = {}; + } + +diff -Nur dl-0.18.1/htdocs/static/guide/de_DE/index.html dl-master/htdocs/static/guide/de_DE/index.html +--- dl-0.18.1/htdocs/static/guide/de_DE/index.html 2017-09-06 12:09:36.000000000 -0400 ++++ dl-master/htdocs/static/guide/de_DE/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,467 +0,0 @@ +- +- +- +- +- +- +-Download ticket service +- +- +- +-
+-

Download ticket service

+- +- +-
+-

Kurze Schritt-für-Schritt Anleitung zum Senden von Anhängen

+-

Rufen Sie die Webseite https://dl.example.com/ auf und melden Sie sich mit +-Ihrem Benutzernamen und Passwort an. Nach der Anmeldung erscheint die folgende +-Seite:

+-t-step-1.png +-
    +-
  1. Klicken Sie, wie in der Abbildung gezeigt, auf "Durchsuchen" und wählen Sie +-die zu sendende Datei aus.
  2. +-
  3. Klicken Sie auf "Senden" und warten Sie, bis die Datei hochgeladen wurde, +-siehe folgende Abbildung.
  4. +-
+-t-step-2.png +-
    +-
  1. Klicken Sie auf "Per E-Mail verschicken", um den Link zur gerade +-hochgeladenen Datei einem beliebigen Empfänger über Ihr E-Mail Programm zu +-schicken.
  2. +-
+-

Bei Verwendung der Standardeinstellungen hat der Empfänger eine Woche Zeit, um +-die Datei herunterzuladen, bevor diese automatisch gelöscht wird. Diese Frist +-kann jedoch geändert werden indem Sie die entsprechenden Parameter vor dem +-hochladen anpassen.

+-

Durch einen Klick auf "Aktive Tickets" am unteren Ende der Seite, kann die +-Liste der hochgeladenen Dateien eingesehen und einzelne Tickets verwaltet +-werden.

+-
+-
+-

Kurze Schritt-für-Schritt Anleitung zum Empfangen von Anhängen

+-

Rufen Sie die Webseite https://dl.example.com/ auf und melden Sie sich mit +-Ihrem Benutzernamen und Passwort an. Nach der Anmeldung erscheint die folgende +-Seite:

+-g-step-1.png +-
    +-
  1. Klicken Sie auf "Neue Upload-Erlaubnis" am unteren Ende der Seite
  2. +-
+-g-step-2.png +-
    +-
  1. Geben Sie Ihre E-Mailadresse an.
  2. +-
  3. Klicken Sie auf "Erstellen" um die Erlaubnis zu erstellen.
  4. +-
+-g-step-3.png +-
    +-
  1. Klicken Sie auf "Per E-Mail verschicken", um die Upload-Erlaubnis an einen +-beliebigen Empfänger zu schicken.
  2. +-
+-

Der Empfänger braucht nach Erhalt der Upload-Erlaubnis den darin enthaltenen +-Link lediglich in einem Browser aufzurufen und die Anweisungen am Bildschirm zu +-befolgen. Sobald der Empfänger die Datei hochgeladen hat, wird Ihnen eine +-Bestätigungs-E-Mail mit einem Link zur hochgeladenen Datei zugeschickt.

+-
+-
+-

Erweiterte Einstellungen

+-

Vor dem Versand einer Datei ist es möglich die Verfallsfristen unter dem Abschnitt "Weitere Optionen" anzupassen.

+-t-advanced.png +-

Wenn Sie möchten, dass die Datei nicht automatisch gelöscht wird, aktivieren +-Sie die Option "Ticket ohne Verfallsfrist ", die Sie unter "Weitere Optionen" +-finden. Die Datei wird dann solange zur Verfügung stehen, bis sie manuell +-gelöscht wird.

+-

Wenn Sie für jeden einzelnen Download einer Datei eine Meldung erhalten +-möchten, geben Sie Ihre E-Mail-Adresse im Feld "Bei Download folgende +-E-Mailadresse benachrichtigen" ein. Sie finden das Feld unter "Weitere +-Optionen".

+-

Frist in # Tagen:

+-
+-Hier können Sie die maximale Anzahl von Tagen angeben, welche die gesendete +-Datei auf dem Server erhalten bleibt. Nach Ablauf dieser Frist wird die Datei +-automatisch gelöscht, unabhängig davon ob sie heruntergeladen wurde oder +-nicht.
+-

Frist in # Stunden, nach dem letzten Download:

+-
+-

Hier können Sie die maximale Anzahl von Stunden angeben, für welche die Datei +-nach dem letzten Download noch auf dem Server verbleiben soll. Jeder weiterer +-Download legt die Verfallsfrist um die angegebene Stundenanzahl erneut fest. +-Ist die Frist abgelaufen, wird die Datei automatisch gelöscht.

+-

Diese Frist-Angabe ermöglicht Ihnen bei Verwendung von großen Zeiträumen +-(Tage/Wochen) häufig verwendete Tickets für einen unbestimmten Zeitraum aktiv +-zu erhalten und sie automatisch zu löschen, sobald sie nicht mehr verwendet +-werden.

+-

Wird die Frist-Angabe hingegen mit kurzen Zeiträumen verwendet (bis zu 24 +-Stunden), wird das Ticket nach dem Herunterladen schnell entfernt, gibt dem +-Empfänger aber noch einen kleinen Spielraum für weitere Downloads.

+-
+-

Frist in # Downloads:

+-
+-Hier können Sie festlegen, wie oft eine Datei insgesamt vom Server +-heruntergeladen werden kann. Bei Erreichen dieser Anzahl wird die Datei +-automatisch gelöscht.
+-

Wird mindestens eine der oben beschriebenen Fristen überschritten, verfällt das +-Ticket und wird somit automatisch gelöscht. Sie können eine oder mehrere +-Fristen deaktivieren, indem Sie den entsprechenden Parameter auf "0" setzen.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/en_EN/index.html dl-master/htdocs/static/guide/en_EN/index.html +--- dl-0.18.1/htdocs/static/guide/en_EN/index.html 2017-09-06 12:09:37.000000000 -0400 ++++ dl-master/htdocs/static/guide/en_EN/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,464 +0,0 @@ +- +- +- +- +- +- +-Download ticket service +- +- +- +-
+-

Download ticket service

+- +- +-
+-

Short Step-by-step guide to send attachments

+-

First, go to https://dl.example.com/ and authenticate with your username and +-password.

+-

You should be presented with this page:

+-t-step-1.png +-
    +-
  1. Click on the button under "Upload File" (labelled either "Browse" or "Choose +-File") as outlined in the picture and pick the file you need to send.
  2. +-
  3. Click "Upload", and wait until the file is uploaded as shown:
  4. +-
+-t-step-2.png +-
    +-
  1. Click "Send via E-Mail" to send an e-mail to someone, containing the link +-to the file you just uploaded.
  2. +-
+-

By default, the recipient has one week to download the file before it is +-automatically cleaned up. You can change this behavior by setting some +-parameters before uploading.

+-

You can see a list of files you have uploaded and manage them by clicking on +-the "List active tickets" button, at the bottom of the page.

+-
+-
+-

Short Step-by-step guide to receive attachments

+-

First, go to https://dl.example.com/ and authenticate with your username and +-password.

+-

You should be presented with this page:

+-g-step-1.png +-
    +-
  1. Click on the "New grant" link at the bottom of the page to start a new +-grant:
  2. +-
+-g-step-2.png +-
    +-
  1. Enter your email address.
  2. +-
  3. Click "Create" to generate an upload grant:
  4. +-
+-g-step-3.png +-
    +-
  1. Click "Send via E-Mail" to send an e-mail to someone, containing the link +-that will allow him to send you any file.
  2. +-
+-

Your recipient simply needs to follow the instructions contained in the link +-itself. Once he uploads the file into the server, you will receive an email +-containing another link to the file just uploaded.

+-
+-
+-

Advanced upload parameters

+-

Before uploading a file, you can customize how the download and cleanup is +-performed by setting some "Advanced" parameters:

+-t-advanced.png +-
    +-
  • If you want your file to never be deleted please check the "Permanent +-ticket" checkbox. Your file will always be available until you manually +-remove it.
  • +-
  • If you want to be notified every time someone downloads the file you can +-write your e-mail in the "Get notified by email" box. You'll receive +-notifications every time the file is successfully downloaded or removed from +-the server. This is great if you want extra confirmation that your email has +-been acted upon.
  • +-
+-

Expire in total # of hours:

+-
+-Type the maximal number of hours the uploaded file is allowed to be kept on +-the server. After this period is passed the file will be deleted from the +-server whether is was downloaded or not.
+-

Expire in # of hours after last dl:

+-
+-

Type the number of hours the uploaded file is allowed to be kept on the +-server after being downloaded. Another download will extend the lifetime of +-the ticket for the specified number of hours. After this period is passed +-without activity, the file is be deleted from the server.

+-

This feature, when used with a long period (days or weeks), allows "hot" +-tickets to be kept alive only until used, and be deleted automatically +-afterward.

+-

When used with a short period (24 hours or less), allows to remove the ticket +-as soon as being downloaded, allowing the recipient some margin to download +-the file more than once.

+-
+-

Expire after # of downloads:

+-
+-Type the number of times the uploaded file is allowed to be downloaded in +-total. After this amount is reached the file will be deleted from the +-server. Handy if you need to ensure the file is downloaded just once from a +-single person.
+-

If at least one of these parameters expires the file will be deleted. You can +-set any parameter to "0" to disable the condition.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/es_ES/index.html dl-master/htdocs/static/guide/es_ES/index.html +--- dl-0.18.1/htdocs/static/guide/es_ES/index.html 2017-09-06 12:09:37.000000000 -0400 ++++ dl-master/htdocs/static/guide/es_ES/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,465 +0,0 @@ +- +- +- +- +- +- +-Download ticket service +- +- +- +-
+-

Download ticket service

+- +- +-
+-

Breve guía paso a paso para subir ficheros

+-

Primero, diríjase a https://dl.example.com/ y autentíquese usando su usuario y +-contraseña.

+-

Esta página debería ser mostrada:

+-t-step-1.png +-
    +-
  1. Cliquee en el botón bajo "Subir fichero" (llamado "Examinar" or "Escoja +-fichero") como se ve en la imagen y seleccione el fichero que necesita subir.
  2. +-
  3. Click en "Subir" y espere mientras el fichero es subido como aquí se muestra:
  4. +-
+-t-step-2.png +-
    +-
  1. Click en "Enviar vía e-mail" para enviar un e-mail a alguien con el enlace +-al fichero que acaba de subir.
  2. +-
+-

Por defecto, el receptor tiene una semana para descargar el fichero antes de +-este sea eliminado automáticamente. Puede cambiar este comportamiento +-configurando algunos parámetros antes de la subida.

+-

Puede ver una lista de ficheros que ha subido y administrarlos cliqueando en el +-botón "Listar tickets activos" a pie de página.

+-
+-
+-

Breve guía paso a paso para recibir ficheros

+-

Primero, diríjase a https://dl.example.com/ y autentíquese usando su usuario y +-contraseña.

+-

Esta página debería ser mostrada:

+-g-step-1.png +-
    +-
  1. Click en el enlace "Nueva concesión" al pie de página para empezar una nueva +-concesión:
  2. +-
+-g-step-2.png +-
    +-
  1. Introduzca su dirección de e-mail.
  2. +-
  3. Click en "Crear" para generar una concesión de subida:
  4. +-
+-g-step-3.png +-
    +-
  1. Click en "Enviar vía E-Mail" para enviar un e-mail a alguien con el enlace +-a quién le permitirá subir un fichero para usted.
  2. +-
+-

El receptor simplemente necesitará seguir las instrucciones contenidas en el +-propio enlace. Una vez este suba un fichero al servidor, usted recibirá un +-e-mail que contendrá un enlace a el fichero que ha sido subido.

+-
+-
+-

Parámetros Avanzados de subida

+-

Antes de subir un fichero, puede personalizar cómo se realizará su descarga y +-su limpieza configurando algunos parámetros "avanzados":

+-t-advanced.png +-
    +-
  • Si quiere que su fichero nunca sea eliminado, por favor, marque la casilla +-"Ticket permanente". Su fichero estará disponible hasta que usted lo elimine +-manualmente.
  • +-
  • Si quiere ser notificado cada vez que alguien descargue el fichero puede +-escribir una dirección de e-mail en el campo "Notificar vía e-mail". Recibirá +-notificaciones cada vez que el fichero sea correctamente descargado o +-eliminado del servidor. Esto es genial si desea una confirmación extra de que +-su e-mail actúa en consecuencia.
  • +-
+-

Expirar en un total de # horas:

+-
+-Introduzca el número máximo de horas que a un fichero subido le está +-permitido permanecer en el servidor. Pasado este período el fichero será +-eliminado del servidor independientemente de si fue descargado o no.
+-

Expirar en # horas tras la última descarga:

+-
+-

Introduzca el número de horas que a un fichero subido se le permite +-permanecer en el servidor tras haber sido descargado. Una nueva descarga +-alargará el tiempo de vida del ticket durante el número de horas +-especificado. Pasado este período sin actividad el fichero será eliminado del +-servidor.

+-

Esta funcionalidad, cuando es usada con un largo período (días o semanas), +-permite a los "hot" tickets permanecer vivos mientras están en uso y ser +-elimindos automáticamente cuando ya no son demandados.

+-

Cuando es usado en un período corto (24 horas o menos), permite eliminar el +-ticket tan pronto como sea descargado, permitiendo al receptor algo de margen +-para descargar el fichero más de una vez.

+-
+-

Expirar tras # descargas:

+-
+-Introduce el número total de veces que es permitido descargar un fichero +-subido. Alcanzado este número el fichero será eliminado del servidor. Útil si +-quiere asegurarse de que el fichero es descargado sólo una vez por una sola +-persona.
+-

Si al menos uno de estos parámetros expira el fichero será eliminado. Puede +-configurar cualquier parámetro a "0" para deshabilitar la condición.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/fr_FR/index.html dl-master/htdocs/static/guide/fr_FR/index.html +--- dl-0.18.1/htdocs/static/guide/fr_FR/index.html 2017-09-06 12:09:37.000000000 -0400 ++++ dl-master/htdocs/static/guide/fr_FR/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,451 +0,0 @@ +- +- +- +- +- +- +-Service de téléchargement de ticket +- +- +- +-
+-

Service de téléchargement de ticket

+- +- +-
+-

Guide rapide pour envoyer des pièces jointes

+-

Tout d'abord, allez sur https://dl.example.com/ et authentifier vous avec votre +-nom d'utilisateur et votre mot de passe.

+-

Vous devriez voir la page ci-dessous:

+-t-step-1.png +-
    +-
  1. Sélectionnez le fichier à envoyer avec le bouton "Parcourir"
  2. +-
  3. Cliquer sur le bouton "Télécharger" pour envoyer votre fichier.
  4. +-
+-t-step-2.png +-
    +-
  1. Cliquez sur le bouton "Envoyer par e-mail" pour envoyer par e-mail le lien +-contenant le fichier que vous venez de télécharger.
  2. +-
+-

Par défaut, le destinataire dispose d'une semaine pour télécharger le fichier +-avant qu'il ne soit automatiquement supprimé. Vous pouvez modifier ce +-comportement en définissant certains paramètres avant de le télécharger.

+-

Vous pouvez voir la liste des fichiers que vous avez téléchargés et aussi les +-gérer en cliquant sur "Tickets actifs", au bas de la page.

+-
+-
+-

Guide rapide pour recevoir des pièces jointes

+-

Tout d'abord, allez sur https://dl.example.com/ et authentifier vous avec votre +-nom d'utilisateur et votre mot de passe.

+-

Vous devriez voir la page ci-dessous:

+-g-step-1.png +-
    +-
  1. Cliquez sur "Nouvelle concession" au bas de la page :
  2. +-
+-g-step-2.png +-
    +-
  1. Entrer votre adresse email.
  2. +-
  3. Cliquez sur "Créer" pour générer une concession:
  4. +-
+-g-step-3.png +-
    +-
  1. Cliquez sur "Envoyer par e-mail" pour envoyer par e-mail le lien qui +-permettra de vous faire parvenir un fichier.
  2. +-
+-

Le destinataire devra simplement suivre les instructions contenues dans le +-mail. Une fois, le fichier téléchargé sur le serveur, vous recevrez un e-mail +-contenant un autre lien vers le fichier que vous pourrez télécharger.

+-
+-
+-

Paramètres avancés

+-

Avant de télécharger un fichier, vous pouvez personnaliser les paramètres de +-téléchargement et de supression en modifiant les "Paramètres avancés":

+-t-advanced.png +-
    +-
  • Si vous souhaitez que votre fichier ne soit jamais supprimé cocher "Ticket +-permanent/téléchargement". Ceci rendra votre fichier toujours disponible +-jusqu'à ce que vous le retiriez manuellement.
  • +-
  • Si vous voulez être averti chaque fois que quelqu'un télécharge le fichier, +-vous pouvez renseigner votre adresse e-mail dans le champs "Notifier par +-e-mail". Vous recevrez une notification chaque fois que le fichier sera +-téléchargé avec succès ou retiré du serveur.
  • +-
+-

Expirera dans # jours:

+-
+-Indiquer le nombre de jours maximal durant lesquels ce fichier pourra être +-téléchargé. Passé ce délai ce fichier ne pourra plus être téléchargé et sera +-automatiquement supprimé.
+-

Expirera dans # heures après le dernier téléchargement:

+-
+-Indiquer le nombre d'heures pendant lesquelles ce fichier restera disponible +-après avoir été téléchargé. Si celui-ci n'est pas téléchargé pendant le délai +-indiqué, il sera automatiquement supprimé.
+-

Expirera après # téléchargement:

+-
+-Indiquer le nombre total de téléchargements autorisé pour ce fichier. Au-delà +-de cette limite, ce fichier sera automatiquement supprimé.
+-

Si au moins un de ces paramètres est appliqué le fichier sera supprimé. Mettre +-n'importe quel paramètre à "0" pour désactiver son état.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/it_IT/index.html dl-master/htdocs/static/guide/it_IT/index.html +--- dl-0.18.1/htdocs/static/guide/it_IT/index.html 2017-09-06 12:09:37.000000000 -0400 ++++ dl-master/htdocs/static/guide/it_IT/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,461 +0,0 @@ +- +- +- +- +- +- +-Download ticket service +- +- +- +-
+-

Download ticket service

+- +- +-
+-

Guida rapida passo-passo all'invio degli allegati

+-

Collegarsi al sito https://dl.example.com/ ed autenticarsi col proprio nome +-utente e password.

+-

La schermata iniziale si presenta come segue:

+-t-step-1.png +-
    +-
  1. Cliccare su "Sfoglia", come indicato nell'immagine e selezionare il file +-desiderato da inviare.
  2. +-
  3. Cliccare su "Invia" ed attendere fino al completamento dell'operazione, +-indicata dalla seguente schermata:
  4. +-
+-t-step-2.png +-
    +-
  1. Cliccare su "Invia per e-mail" per inviare il collegamento al file appena +-caricato via e-mail ad un qualsiasi destinatario usando il proprio programma +-di posta elettronica.
  2. +-
+-

Con le impostazioni predefinite, il destinatario avrà una settimana di tempo +-per scaricare il file prima che venga eliminato automaticamente. È possibile +-cambiare la scadenza impostando alcuni parametri prima dell'invio del file.

+-

La lista dei file caricati è gestibile cliccando sul collegamento "Ticket +-attivi", disponibile in basso alla pagina.

+-
+-
+-

Guida rapida passo-passo alla ricezione degli allegati

+-

Collegarsi al sito https://dl.example.com/ ed autenticarsi col proprio nome +-utente e password.

+-

La schermata iniziale si presenta come segue:

+-g-step-1.png +-
    +-
  1. Cliccare su "Nuova concessione", in basso alla pagina.
  2. +-
+-g-step-2.png +-
    +-
  1. Inserire il proprio indirizzo e-mail.
  2. +-
  3. Cliccare su "Crea" per generare la concessione.
  4. +-
+-g-step-3.png +-
    +-
  1. Cliccare su "Invia per email" per inviare la concessione e le istruzioni di +-utilizzo tramite e-mail ad un qualsiasi destinatario.
  2. +-
+-

Il destinatario, una volta ricevuto il collegamento alla concessione, dovrà +-semplicemente seguire le indicazioni. Quando il destinatario avrà terminato +-l'invio del file, riceverete immediatamente (tramite e-mail) conferma ed un +-collegamento al file appena trasferito.

+-
+-
+-

Parametri avanzati

+-

Prima di procedere all'invio di un file, è possibile impostare la sua +-scadenza accedendo ai parametri avanzati:

+-t-advanced.png +-
    +-
  • Se desiderate che il file non venga mai eliminato, abilitare l'opzione +-"Nessuna scadenza", disponibile nel pannello "Avanzate".
  • +-
  • Se desiderate ricevere notifica per ogni singolo scaricamento, inserite il +-vostro indirizzo e-mail nella casella "Notifica via e-mail", disponibile nel +-pannello avanzate.
  • +-
+-

Scadenza in # giorni:

+-
+-Inserire il numero massimo di giorni che il file inviato verrà mantenuto nel +-server. Passato il termine, il file viene eliminato automaticamente, sia che +-venga scaricato o meno.
+-

Scadenza in # ore dopo l'ultimo scaricamento:

+-
+-

Inserire il numero ore che il file inviato verrà mantenuto nel server dopo +-essere stato scaricato. Ogni scaricamento estende il termine del numero di +-ore specificato. Passato il termine, il file viene eliminato automaticamente.

+-

Questa funzionalità, usata insieme ad un lungo periodo (giorni o settimane), +-permette di mantenere ticket molto utilizzati attivi per un periodo +-indefinito, e rimuoverli automaticamente alla cessazione di utilizzo.

+-

Usata invece con periodi brevi (24 ore o meno), consente di eliminare il +-ticket rapidamente dopo lo scaricamento, dando al destinatario del margine +-per effettuarne altri.

+-
+-

Scadenza in # scaricamenti

+-
+-Inserire il numero di volte che il file può venire scaricato in totale dal +-server. Passato il termine, il file viene eliminato automaticamente.
+-

La scadenza del ticket viene effettuata alla scadenza di uno qualsiasi dei +-termini impostati (solitamente del termine che arriva prima). È possibile +-impostare un parametro a "0" per disabilitarne il relativo termine.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/ja_JP/index.html dl-master/htdocs/static/guide/ja_JP/index.html +--- dl-0.18.1/htdocs/static/guide/ja_JP/index.html 2017-09-06 12:09:37.000000000 -0400 ++++ dl-master/htdocs/static/guide/ja_JP/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,442 +0,0 @@ +- +- +- +- +- +- +-ダウンロードチケットサービス +- +- +- +-
+-

ダウンロードチケットサービス

+- +- +-
+-

簡易版 添付送信ガイド

+-

はじめに、https://dl.example.com/ をブラウザで開き、ユーザ名とパスワードで認証を行います。

+-

このページになります。:

+-t-step-1.png +-
    +-
  1. "ファイルのアップロード" ( "ブラウズ" または "参照..." と書かれている部分) の下のボタンをクリックします。図に書かれているように、送りたいファイルを選択します。
  2. +-
  3. "アップロード" をクリックして、図のようにファイルがアップロードが終わるまで待ちます。:
  4. +-
+-t-step-2.png +-
    +-
  1. "電子メールで送る" をクリックして、今アップロードしたファイルをダウンロードするためのリンクが入ったEメールを特定の人にメールを送ります。
  2. +-
+-

標準設定では、受け手側は、ファイルが自動的に消される前の1週間以内にファイルのダウンロードを行う必要があります。この動作については、アップロードする前にパラメータを変更することができます。

+-

このページの一番下の "有効なチケット" ボタンをクリックすることで、アップロードしたファイルリストを見ることができ、それを管理することができます。

+-
+-
+-

簡易版 添付受信ガイド

+-

最初に、 https://dl.example.com/ をブラウザで開き、ユーザ名とパスワードで認証を行います。

+-

このページが見えるはずです :

+-g-step-1.png +-
    +-
  1. このページの一番下の "新規のグラント" のリンクをクリックすると新しいグラントを作ることができます。:
  2. +-
+-g-step-2.png +-
    +-
  1. あなた自身の Eメールアドレスを入力してください。
  2. +-
  3. "作成" をクリックすると、アップロードのグラントが生成されます。:
  4. +-
+-g-step-3.png +-
    +-
  1. "電子メールで送る" をクリックすると、特定の人がファイルをあなたに送るのを許可するリンクが入ったEメールをその人に送ります。
  2. +-
+-

受け取った人は、メールのリンクに先に書かれている操作に従う必要があります。受け取った人がファイルをサーバにアップロードした後、あなたに別なリンクが入ったメールが自動的に送られます。

+-
+-
+-

詳細アップロードのパラメーター

+-

"詳細" のパメラーターで、ファイルをアップロードする前に、ダウンロードとその消去の実行がどのようにおこなうかを設定することができます

+-t-advanced.png +-
    +-
  • ファイルを自動的に削除したくない場合 "永続のチケット" のチェックボックスにチェックをいれてください。 そのファイルは手動で削除するまでいつでも有効となります。
  • +-
  • 毎回ダウンロードされる毎に通知をうけとりたい場合 "電子メールで通知されます" にあなたのEメールアドレス入力することで受け取ることができます。ファイルのダウンロード、またはサーバからの削除が起きた時ごとに受け取ることができます。あなたのメールが届いているかどうかの追加の確認が必要な場合は、これは有効な機能です。
  • +-
+-

全体で以下の日で公開満了します:

+-
+-サーバにファイルを保持する最大日数を入力します。この期間が過ぎると、 +-ファイルがダウンロードされていても、されていなくても、そのファイルはサーバ +-から削除されます。
+-

最終ダウンロードから以下の日で公開満了になります:

+-
+-

ダウンロードした後、サーバでアップロードされたファイルを保持する時間を入力してください。 +-別なダウンロード操作があればチケットを消すまでの時間が延びます。この期間を何も操作なく超えると、 +-ファイルはサーバから削除されます。

+-

この機能は、長い期間(何日とか、何週間とか)で使う時に使うことができ、使われるまで +-チケットを "有効" にすることができ、その後で自動的に削除されます。

+-

短い期間(24時間以内など)で使うときは、ダウンロードされたすぐに、チケットを削除し、 +-ファイルを一度以上ダウンロードするための予備時間となります。

+-
+-

以下の回数のダウンロードで公開終了となります:

+-
+-アップロードされたファイルのダウンロードされる全体の回数を入力してください。 +-この回数になると、ファイルは、サーバから削除されます。 +-1人の人から1度ダウンロードされたかどうかを確認するには、便利です。
+-

これらのパラメータの1つで公開解除となると、ファイルは削除されます。いくつかの +-パラメターを "0" にすると、条件は満たさなくなります。

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/nl_NL/index.html dl-master/htdocs/static/guide/nl_NL/index.html +--- dl-0.18.1/htdocs/static/guide/nl_NL/index.html 2017-09-06 12:09:38.000000000 -0400 ++++ dl-master/htdocs/static/guide/nl_NL/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,474 +0,0 @@ +- +- +- +- +- +- +-Download ticket service +- +- +- +-
+-

Download ticket service

+- +- +-
+-

Korte stap voor stap handleiding om attachments te versturen

+-

Ga alleereerst naar https://dl.example.com/ en log in met uw gebruikersnaam en +-wachtwoord.

+-

U ziet nu onderstaande pagina:

+-t-step-1.png +-
    +-
  1. Klik op de knop "Bestand kiezen" (of "Browse") onder "Een bestand uploaden" +-zoals aangegeven op bovenstaand figuur. Selecteer vervolgens het bestand +-dat u wilt versturen.
  2. +-
  3. Klik op "Bestand uploaden" en wacht totdat het bestand is geüpload. Als het +-uploaden is gelukt verschijnt de volgende figuur:
  4. +-
+-t-step-2.png +-
    +-
  1. Klik "Verstuurd per e-mail" om de e-mail naar de gewenste persoon te +-versturen. Deze mail bevat de link naar het bestand dat u zojuist heeft +-geüpload.
  2. +-
+-

Standaard heeft de ontvanger één week de tijd om het bestand te downloaden +-voordat dit bestand automatisch verwijderd wordt. U kunt dit gedrag wijzigen +-door een aantal parameters in te stellen voordat u het bestand upload.

+-

U kunt een lijst van bestanden die u heeft geüpload zien en wijzigen door op +-"Actieve tickets" onderaan de pagina te klikken.

+-
+-
+-

Korte stap voor stap handleiding om attachments te ontvangen

+-

Ga alleereerst naar https://dl.example.com/ en log in met uw gebruikersnaam en +-wachtwoord.

+-

U ziet nu onderstaande pagina:

+-g-step-1.png +-
    +-
  1. Klik op de "Nieuwe toekenning" link onderaan de pagina om een nieuwe +-toekenning te maken.
  2. +-
+-g-step-2.png +-
    +-
  1. Vul uw eigen e-mail adres in.
  2. +-
  3. Klik op "Maak" om een upload toekenning te maken.
  4. +-
+-g-step-3.png +-
    +-
  1. Klik op "Verstuurd per e-mail" om een e-mail naar iemand te versturen. Deze +-e-mail bevat een link die het de ontvanger mogelijk maakt om u een groot +-bestand terug te sturen.
  2. +-
+-

Uw ontvanger hoeft alleen maar de instructies te volgen zoals aangegeven in de +-mail. Als de ontvanger van de link zijn bestand heeft geüpload naar de server +-ontvangt u een notificatie e-mail met daarin een link naar het geüploade +-bestand.

+-
+-
+-

Geavanceerde upload parameters

+-

Voordat u een bestand upload kunt u met geavancceerde parameters instellen hoe +-vaak het bestand gedownload kan worden en of en wanneer het bestand automatisch +-wordt verwijderd.

+-t-advanced.png +-
    +-
  • Als u niet wilt dat uw bestand ooit automatisch wordt verwijderd zet dan +-een vinkje bij "Ticket permanent maken". Uw bestand zal altijd beschikbaar +-blijven totdat u het bestand zelf handmatig verwijderd.
  • +-
  • Als u iedere keer als iemand uw bestand download een melding wilt ontvangen +-vul dan uw e-mail adres in bij "Ontvang een e-mail notificatie nadat het +-bestand is gedownload". U ontvangt nu iedere keer een melding als uw bestand +-succesvol is gedownload of wanneer het automatisch van de server is +-verwijderd. Deze functie is erg handig als u er zeker van wilt zijn dat men +-gereageerd heeft op de door u verstuurde e-mail.
  • +-
+-

Vervalt na # dagen:

+-
+-Vul hier het maximaal aantal dagen in dat een geüpload bestand op de server +-blijft staan. Na deze periode wordt het bestand automatisch van de server +-verwijderd. Het maakt hierbij niet uit of het bestand wel of niet +-gedownload was tijdens het ingestelde tijdsinterval.
+-

Vervalt na # dagen na de laatste download:

+-
+-

Vul hier het maximaal aantal dagen in dat een geüpload bestand op de server +-blijft staan nadat het gedownload is. Een volgende download zorgt ervoor +-dat de teller weer wordt gereset. Nadat het ingestelde aantal dagen is +-verstreken zonder dat er een download van het bestand heeft plaatsgevonden, +-zal het bestand automatisch van de server verwijderd worden.

+-

Deze functie zorgt ervoor dat populaire bestanden bewaard blijven maar +-nadat deze is gezakt automatisch verwijderd worden. Het is aan +-te raden om het tijdsinterval in te stellen op meerdere dagen of weken.

+-

Zorg er altijd voor dat u het tijdsinterval zodanig instelt dat een +-ontvanger van uw e-mail het bestand indien nodig twee keer kan downloaden.

+-
+-

Vervalt na # downloads:

+-
+-Vul het aantal keer in dat het geüploade bestand gedownload kan worden. Als +-het ingestelde aantal downloads bereikt is zal het bestand automatisch van +-de server verwijderd worden. Deze functie is handig als u er bijvoorbeeld +-zeker van wilt zijn dat uw bestand één keer gedownload wordt door één +-persoon.
+-

Als één van bovenstaande ingestelde parameters verloopt dan zal het bestand +-verwijderd worden. Als u "0" invult bij een parameter dan zal deze +-uitgeschakeld worden.

+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/static/guide/zh_CN/index.html dl-master/htdocs/static/guide/zh_CN/index.html +--- dl-0.18.1/htdocs/static/guide/zh_CN/index.html 2017-09-06 12:09:38.000000000 -0400 ++++ dl-master/htdocs/static/guide/zh_CN/index.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,434 +0,0 @@ +- +- +- +- +- +- +-鉴权下载服务系统 +- +- +- +-
+-

鉴权下载服务系统

+- +- +-
+-

简明步骤:上传附件

+-

首先,访问 https://dl.example.com/ 并使用正确的用户名、密码完成登陆认证。

+-

如果一切正常,你应该可以看到和下图类似的页面:

+-t-step-1.png +-
    +-
  1. 如上图框线所示,单击“上传文件”下方的按钮(按钮上一般会显示“选择文件”或者是“浏览”字样),选择需要上传的文件。
  2. +-
  3. 单击“上传”,然后等待,直至文件上传成功,如下图所示:
  4. +-
+-t-step-2.png +-
    +-
  1. 单击“使用电子邮件发送”,可以给对方发送邮件,邮件中会包含你刚刚上传文件的地址。
  2. +-
+-

默认情况下,文件接收人有一周的时间下载这个文件,超时后,该文件将被自动清除。要变更这一设置,可在上传前设置对应的参数。

+-

你可通过点击页面底部的“所有提取码”链接来查看、管理的所有上传的文件。

+-
+-
+-

简明步骤:接收(他人上传)附件

+-

首先,访问 https://dl.example.com/ 并使用正确的用户名、密码完成登陆认证。

+-

你应该可以看到和下图类似的页面:

+-g-step-1.png +-
    +-
  1. 单击页面底部的“新建授权”链接,来新建单次上传文件授权:
  2. +-
+-g-step-2.png +-
    +-
  1. 输入 你的 电子邮件地址。
  2. +-
  3. 单击“创建”,即可生成新的文件上传授权。
  4. +-
+-g-step-3.png +-
    +-
  1. 单击“使用电子邮件发送”,可以向对方发送邮件,邮件中会包含一个链接,使用该链接,对方可以上传任意文件。
  2. +-
+-

邮件接收者只需要按照链接的指示,完成对应的上传动作,即可上传文件。文件上传到服务器后,你将立刻收到邮件提醒,该邮件中将包含对应已上传文件的文件地址。

+-
+-
+-

高级上传参数

+-

上传文件前,你可通过“高级设置”中的参数定义服务器的文件下载、清除行为:

+-t-advanced.png +-
    +-
  • 如果你需要服务器永远不删除一个文件 请勾选“本文件不过期”选项。该文件将永远可用,直到您从服务器上将其手动删除。
  • +-
  • 如果你希望每次有人下载文件后都收到通知 可在“通过电子邮件接收通知”文本框内输入你的电子邮件地址。这样一来,你将在每次该文件被下载、或是从服务器被删除后收到邮件通知。该功能在您需要确认电子邮箱是否正常工作时十分有用。
  • +-
+-

在指定天数后过期:

+-
+-在“在多少天内过期?”文本框处输入数字,系统将以该数字作为保留该文件的最长期限。超过该期限后,该文件无论是否被下载过,都将被删除。
+-

从最后一次下载算起,在指定天数后过期:

+-
+-

在“从最后一次下载算起,几天后过期?”文本框中输入数字,在文件被下载后,系统将以该数字作为保留该文件的最长期限。如果期间有他人再次下载文件,则该文件的保留期限将按照对应有效天数被适当延长。如果保留期限内内无人再下载此文件,该文件将被清除。

+-

该功能在用于长期保存(几天、几周)的文件时,可以让高人气的提取码在被使用时一直保持激活状态,并在无人使用后,被马上删除。

+-

在用于短期保存(小于一天/24小时)的文件时,该功能可以让文件在下载后立即消失,但同时也给收件人提供了一定缓冲时间,来多次下载文件。

+-
+-

在下载指定次数后过期:

+-
+-

在“下载几次后过期?”文本框中输入数字,系统将以该数字作为对应文件能被下载的最多次数。在文件下载次数达到这个数字后,文件将从服务器上清除。如果您只想让一个人下载该文件,且只下载一次,该功能非常方便。

+-

这些设置参数是并列的,任何一个参数过期,都会导致文件清除。如果您想禁用这些设置,请在对应参数中输入“0”。

+-
+-
+-
+- +- +diff -Nur dl-0.18.1/htdocs/style/default/include/.htaccess dl-master/htdocs/style/default/include/.htaccess +--- dl-0.18.1/htdocs/style/default/include/.htaccess 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/htdocs/style/default/include/.htaccess 2021-03-16 18:59:58.000000000 -0400 +@@ -1,4 +1,9 @@ + +- Order allow,deny +- Deny from all ++ = 2.4> ++ Require all denied ++ ++ ++ Order allow,deny ++ Deny from all ++ + +diff -Nur dl-0.18.1/.mailmap dl-master/.mailmap +--- dl-0.18.1/.mailmap 1969-12-31 19:00:00.000000000 -0500 ++++ dl-master/.mailmap 2021-03-16 18:59:58.000000000 -0400 +@@ -0,0 +1,2 @@ ++Yuri D'Elia wavexx ++Yuri D'Elia Yuri D'Elia +diff -Nur dl-0.18.1/NEWS.html dl-master/NEWS.html +--- dl-0.18.1/NEWS.html 2017-09-06 12:09:38.000000000 -0400 ++++ dl-master/NEWS.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,707 +0,0 @@ +- +- +- +- +- +- +- +- +- +- +-
+- +- +-
+-

dl 0.18.1: 2017-09-06

+-
    +-
  • Fix upgrade script and incompatibilities when using MySQL. +-Thanks to Daniel Berteaud.
  • +-
+-
+-
+-

dl 0.18: 2017-09-04

+-

Major new features:

+-
    +-
  • Support for multiple file uploads in both tickets and grants. When multiple +-files are attached, a Zip archive is automatically created with the contents. +-The PHP "Zip" extension is now required.
  • +-
  • Grants are now reusable. With the new defaults, senders are no longer +-restricted to a single use/file per grant, but can keep reusing the same link +-as needed. The grant, just like a ticket, is then automatically expired when +-left unused for a certain amount of time.
  • +-
  • Tickets generated while using a grant are now split into a separated +-"Received files" page. The "All tickets" page reserved to administrators +-still shows all tickets combined and color-coded.
  • +-
  • A new Android client is now available: PokéDL.
  • +-
+-

Enhancements:

+-
    +-
  • The ticket and grant expiration parameters have been streamlined for common +-usage patterns, becoming mostly self-explanatory.
  • +-
  • When using a grant, the user can now attach a comment alongside the uploaded +-file/s. The comment is sent back to the grant owner in the notification.
  • +-
  • Tickets now show the generating grant ID in the edit/detailed view.
  • +-
  • The grant comment assigned during creation is now shown in both the tooltip +-of the grant list and in email notifications involving grant usage.
  • +-
  • Ticket/grant passwords were previously always included in notifications. The +-password sending policy can now be controlled at creation time, and defaults +-to sending the password only when automatically generated.
  • +-
  • The subject prefix in email notifications can now be customized.
  • +-
  • dl-wx now allows to generate grants.
  • +-
  • General dl-cli overhaul:
      +-
    • dl-cli now runs under both python 3 and python 2.7, preferring python 3
    • +-
    • The password can be read from an external command using passcmd
    • +-
    • Public-key pinning is now supported through the fingerprint option
    • +-
    • Multiple files can now be uploaded in a single ticket (for efficiency, +-dl-cli generates a Zip archive locally before uploading)
    • +-
    • When generating a grant, the email address is now optional if available +-in the configuration file
    • +-
    • The ConfigObj module is now required
    • +-
    +-
  • +-
+-

Bug fixes:

+-
    +-
  • Tickets generated while using a grant were incorrectly calculating the expiry +-from the grant creation time, resulting in premature expiration. Ticket +-expiry is now calculated starting at actual upload time.
  • +-
  • Download of files larger than 2GB would previously fail when using DL with +-MySQL or Postgres. Fix by Daniel Berteaud.
  • +-
  • Ticket and grant invalid access or invalid password attempts are now logged.
  • +-
  • Left-clicking on the dl-wx tray's icon on Linux now works as expected.
  • +-
+-

Other changes:

+-
    +-
  • The minimum required PHP version has been raised to 5.5 or higher.
  • +-
  • Important PHP settings are now preset in the bundled htdocs/.htaccess +-file for the Apache/mod_php combination.
  • +-
  • Simplified Chinese translation by Guangyu Dong.
  • +-
  • Russian translation by Олейник О.В.
  • +-
  • The Thunderbird add-on has been updated to support Thunderbird 52.
  • +-
  • The Windows dl-wx executable has been rebuilt with SNI support.
  • +-
+-

Please note: DL 0.18 requires a database schema update! Please read the +-database upgrade procedure in the README!

+-
+-
+-

dl 0.17.1: 2016-05-01

+-
    +-
  • Filenames are now sanitized more aggressively when received. This avoids +-browser/client failures when receiving files that contain illegal characters +-for the current platform (which might be legal in another).
  • +-
  • Filenames containing multibyte characters could previously result in +-unexpected truncation; they're now handled correctly.
  • +-
  • The uploaded filename is included in grant notifications.
  • +-
  • The Thunderbird add-on has been updated to support Thunderbird 45.
  • +-
  • In the ticket details, the full timestamp of the download is now shown.
  • +-
  • Minor code and documentation fixes.
  • +-
+-
+-
+-

dl 0.17: 2015-06-26

+-
    +-
  • Login attempts are now logged.
  • +-
  • Log messages are now more uniform, always including the remote address and +-username (when available).
  • +-
  • The Thunderbird add-on has been updated to support Thunderbird 38.
  • +-
+-
+-
+-

dl 0.16: 2015-01-22

+-
    +-
  • The database connection is automatically re-established when timed out after +-slow uploads/downloads (affects systems not using sqlite).
  • +-
  • dl-cli can now prompt for a password when left unspecified in the +-~/.dl.rc configuration file.
  • +-
  • Added Japanese translation by Teruo IWAI.
  • +-
  • Dutch user-guide translation by Maarten Schoonman.
  • +-
+-
+-
+-

dl 0.15: 2014-11-28

+-
    +-
  • File names with special and/or UTF-8 characters are now correctly preserved +-on all browsers.
  • +-
  • Added Dutch translation by Maarten Schoonman.
  • +-
+-
+-
+-

dl 0.14: 2014-10-16

+-
    +-
  • Fixed broken Content-Length header with the Apache/mod_php/mod_deflate +-combination, which would prevent downloads to be resumed.
  • +-
  • The built-in skin has been updated.
  • +-
  • The skin can now be customized and set in the configuration file.
  • +-
  • A work-around has been found to allow PHP 5.4-5.5 to upload files up to 4GB +-(note that starting with PHP 5.6 there is no upload size limitation).
  • +-
  • Logging of server-side errors has been improved.
  • +-
+-
+-
+-

dl 0.13: 2014-07-31

+-
    +-
  • The "Active tickets/grants" pages for administrators now show only their own +-tickets, like for normal users. Other tickets are visible in the new "All +-tickets/grants" pages.
  • +-
  • Upload progress information is now implemented client-side using HTML5/JS, +-which is both more responsive and waives any PHP configuration/version +-restrictions.
  • +-
  • Ticket/grant/user listings can now be sorted by clicking on the table header.
  • +-
  • The date/time format can now be customized.
  • +-
  • Spaces in uploaded file names are now correctly preserved.
  • +-
  • The REST interface can now be used with the built-in authentication method +-without additional configuration also when using apache/fcgi.
  • +-
  • The REST interface now supports a method to generate grants.
  • +-
  • The Thunderbird add-on now includes a new menu command (under "Tools") and a +-new toolbar icon in the composer window to generate and insert grants in the +-current message.
  • +-
  • Added Brazilian Portuguese and Czech localizations (thanks to Guilherme +-Benkenstein and Jan Štětina).
  • +-
  • Minor bug/cosmetic fixes.
  • +-
+-

DL 0.12 is the last release offering an upgrade path from DL 0.3. Version 0.13 +-can only upgrade from 0.4 and above. If you have an old installation, you'll +-need to perform a two step upgrade using an earlier release.

+-
+-
+-

dl 0.12: 2013-12-10

+-
    +-
  • Add a new configurable "e-mail" address in the preferences, which is used as +-a default when creating grants and receiving notifications.
  • +-
  • Support for MySQL and PostgreSQL.
  • +-
  • Support for provided e-mail address with external authentication using +-USER_EMAIL header (useful for LemonLDAP::NG/webSSO).
  • +-
  • Fix REST interface when used in combination with LemonLDAP::NG/webSSO.
  • +-
  • Improved French localization.
  • +-
  • The timezone of the web interface is now customizable.
  • +-
  • Minor bug/cosmetic fixes.
  • +-
+-

Please note: DL 0.12 requires a database schema update! Please read the +-database upgrade procedure in the README!

+-
+-
+-

dl 0.11: 2013-07-05

+-
    +-
  • Fixed CSRF vulnerability of the admin interface (discovered by Dirk Reimers).
  • +-
  • Mitigations against session fixation attacks (discovered by Dirk Reimers).
  • +-
  • Fixed CSRF vulnerability of the REST interface when used in combination with +-HTTP/external authentication.
  • +-
  • Improved client-side validation of the forms (with HTML5/JS where available).
  • +-
  • Password hashing for the user/ticket/grant DB switched to PHPass.
  • +-
  • Progress bar updating improvements.
  • +-
  • Thunderbird integration is now available through the new included extension +-"Thunderbird-Filelink-DL", which converts attachments to links automatically.
  • +-
  • Minor bug/cosmetic fixes.
  • +-
+-

Please note: DL 0.11 requires a database schema update! Please read the +-database upgrade procedure in the README!

+-

Upgrading to DL 0.11 has implication for existing users. The new hashing scheme +-limits usernames to 60 characters and passwords to 72 to prevent DoS attacks. +-Users having usernames/passwords exceeding these limits won't be able to login +-after the upgrade, and can only be managed manually through the command line.

+-

The password hash of existing users is automatically rehashed using the new +-scheme upon a successful login (no password change is required).

+-

The optional password of tickets and grants is similarly affected and upgraded +-transparently upon successful usage. Tickets/grants having passwords longer +-than 72 characters though will require a manual password reset.

+-

To fully prevent CSRF attacks on the REST interface when used in combination +-with HTTP authentication the protocol has been broken. Clients (such as the +-supplied "dl-wx") require an upgrade, though new clients can still communicate +-to an old server.

+-
+-
+-

dl 0.10.1: 2012-03-09

+-
    +-
  • A bug was fixed in the initialization code that could cause grant uploads to +-fail in certain configurations.
  • +-
+-
+-
+-

dl 0.10: 2012-02-06

+-
    +-
  • The default configuration file has been renamed to "config.php.dist" and must +-now be manually copied/renamed to be used. If a suitable "config.php" is not +-found in the include/ directory, then the configuration is read from +-"/etc/dl.php". This will allow smoother release upgrades in the future.
  • +-
  • Notifications of tickets and grants now use the same locale that was used +-during the creation of the ticket/grant itself.
  • +-
  • A new "Preferences" page has been added, allowing users to change their +-password (currently supported only for internal authentication).
  • +-
  • Changing "hours after last download" while editing a ticket didn't actually +-extend the ticket lifetime. Changing the ticket lifetime now works correctly.
  • +-
  • "hours after last download" has been changed to "days after last download".
  • +-
  • Default ticket/grant expiration settings have been increased significantly.
  • +-
  • A new REST API has been implemented, allowing external applications to use the +-service programmatically.
  • +-
  • Two python clients have been added to the distribution: a command-line python +-client "dl-cli" and a graphical client "dl-wx".
  • +-
  • Minor bug and UI fixes.
  • +-
+-

Please note: DL 0.10 requires a database schema and webserver configuration +-update! Please read the database upgrade procedure in the README and the +-relevant notes about web server configuration.

+-
+-
+-

dl 0.9.1: 2011-12-31

+-
    +-
  • Fixed a grave security issue: unauthorized parties can perform login as any +-arbitrary user when using the built-in authentication mechanism by supplying +-an authorization header. DL versions down to 0.3 are affected.
  • +-
+-
+-
+-

dl 0.9: 2011-04-06

+-
    +-
  • The settings of tickets and grants are now stored independently.
  • +-
  • Default ticket/grant settings can be specified in the config file.
  • +-
  • Most ticket and grant options are now moved into an "advanced" panel.
  • +-
  • Grant notifications now include the ticket password in the message.
  • +-
  • Form validation is now also performed in JavaScript.
  • +-
  • Enlarged the width of the interface to 800px.
  • +-
  • Users management is now available through the web interface.
  • +-
  • French, Italian, Spanish and German translation.
  • +-
  • Multi-line comments can be attached to tickets and grants.
  • +-
  • Improved the e-mail notification text.
  • +-
  • Improved ticket and grant listings.
  • +-
  • Tickets can now be edited after being created.
  • +-
  • Minor bug and UI fixes.
  • +-
+-
+-
+-

dl 0.8: 2010-07-10

+-
    +-
  • Update PHP-Gettext to 1.1.10 (fixing several PHP Notices).
  • +-
  • Fix browser language autodetection (typo, thanks to Bert-Jan Kamp).
  • +-
  • Fix ticket expiration when using sqlite3 (table locking issues).
  • +-
  • Do not purge tickets prematurely after an unsuccessful download.
  • +-
  • Purge tickets immediately after the download, when possible.
  • +-
  • "useradmin.php" now allows to reset/change user role and password.
  • +-
  • All notifications are now sent using the default locale.
  • +-
  • Ticket expiration can be performed with an external utility.
  • +-
  • The user-guide is now included in the admin interface.
  • +-
+-
+-
+-

dl 0.7: 2010-03-10

+-
    +-
  • Fix XSS vulnerability for unknown ticket IDs (discovered by Sven Eric Neuz)
  • +-
+-
+-
+-

dl 0.6: 2010-03-03

+-
    +-
  • Remember the selected language with a cookie.
  • +-
  • Allow to tune the DB expiration process to improve the performance.
  • +-
  • Fixed E-Mail subject encoding.
  • +-
  • German translation update.
  • +-
  • PHP 5.3 warning fixes.
  • +-
+-
+-
+-

dl 0.5: 2010-02-09

+-
    +-
  • Fix upload progress-bar on Chrome and Safari.
  • +-
  • Minor bug, UI and usability fixes.
  • +-
  • Internationalization support.
  • +-
  • Italian and German translation.
  • +-
  • License changed to GNU GPL 2.
  • +-
+-
+-
+-

dl 0.4: 2009-11-24

+-
    +-
  • Ticket activity can be logged to syslog or a file.
  • +-
  • The minimal required PHP version is now 5.0.
  • +-
  • PDO is now used for the users/tickets database (defaulting to a sqlite +-database). Upgrading instructions in the README.
  • +-
  • The submission form now allows to automatically send a link of the ticket to +-the specified address/es.
  • +-
  • A ticket can now require a password to be downloaded.
  • +-
  • "Upload grants" can now be created, allowing others to send you a single file +-through DL.
  • +-
  • Progress-bar indicator during uploads.
  • +-
  • Required fields are highlighted when missing.
  • +-
+-
+-
+-

dl 0.3: 2009-09-02

+-
    +-
  • CSS-ification, with new skin from Kim Thostrup <kim@thostrup.dk>.
  • +-
  • Include IE5/6 PNG fix from Angus Turnbull http://www.twinhelix.com
  • +-
  • Multiuser support with HTTP authentication or internal user database.
  • +-
  • License changed to LGPL 3
  • +-
+-
+-
+-

dl 0.2: 2007-10-10

+-
    +-
  • Renamed "aux.php" to "funcs.php" to avoid "reserved file name" errors +-under Windows.
  • +-
  • Support commas in addition to semicolons as e-mail separators in the +-notify field.
  • +-
  • Removed the 'ID' field in "active tickets" listings.
  • +-
  • Allow to attach a comment in any ticket.
  • +-
  • Byte-ranges support.
  • +-
+-
+-
+-

dl 0.1: 2007-06-15

+-
    +-
  • First release.
  • +-
+-
+-
+- +- +diff -Nur dl-0.18.1/NEWS.rst dl-master/NEWS.rst +--- dl-0.18.1/NEWS.rst 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/NEWS.rst 2021-03-16 18:59:58.000000000 -0400 +@@ -1,3 +1,15 @@ ++dl 0.19: 2021-??-?? ++------------------- ++ ++* Fix compatibility with PHP 8 (includes an update of the built-in ++ PHP-Gettext to 1.0.12). ++* Enforce display_errors=Off once logging is setup. ++* Fix temporary ZIP file creation (thanks to @SQ-SEN). ++* Fix spurious notices in basefuncs.php (thanks to Emanuele Rosati). ++* Fix warning in parameter validation with PHP 8. ++* Allow unicode filenames in ``dl-cli`` (thanks to @mjg) ++ ++ + dl 0.18.1: 2017-09-06 + --------------------- + +@@ -266,7 +278,7 @@ + dl 0.8: 2010-07-10 + ------------------ + +-* Update PHP-Gettext to 1.1.10 (fixing several PHP Notices). ++* Update PHP-Gettext to 1.0.10 (fixing several PHP Notices). + * Fix browser language autodetection (typo, thanks to Bert-Jan Kamp). + * Fix ticket expiration when using sqlite3 (table locking issues). + * Do not purge tickets prematurely after an unsuccessful download. +diff -Nur dl-0.18.1/README.html dl-master/README.html +--- dl-0.18.1/README.html 2017-09-06 12:09:39.000000000 -0400 ++++ dl-master/README.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,1108 +0,0 @@ +- +- +- +- +- +- +-dl: download ticket service +- +- +- +-
+-

dl: download ticket service

+- +- +-

"dl" is a simple file sharing service for quick/one-off file transfers. Upload +-a file to get a link you can share. Or create a sharing link to receive files +-from others. The uploaded files are automatically removed when left unused, +-requiring zero additional maintenance.

+-

"dl" is built for your users: easy to use with any browser, integrates +-smoothly with Thunderbird for large attachments, works on Android, Windows +-and OSX or straight from the command line for maximum convenience.

+-
+-

Requirements

+-
    +-
  • PHP 5.5 or higher.
  • +-
  • PHP SQLite module (or another PDO database module).
  • +-
  • PHP mbstring module.
  • +-
  • PHP OpenSSL module.
  • +-
  • PHP Zip module.
  • +-
  • Web server access for installation and setup.
  • +-
+-
+-
+-

Installation

+-

The installation is divided into three steps:

+-
    +-
  1. Installation of the files
  2. +-
  3. Database creation/setup or database upgrade
  4. +-
  5. Initial user creation
  6. +-
+-

Due to the number of possible configurations, the installation must be carried +-on manually.

+-
+-

DL installation

+-
    +-
  • Copy the htdocs directory contained in the archive to a directory of +-choice under your web server.

    +-
  • +-
  • Copy include/config.php.dist to either include/config.php or +-/etc/dl.php and customize as needed. This usually means changing the URL +-and E-Mail of the service.

    +-
  • +-
  • Ensure the include and style/*/include directories are not directly +-accessible externally. Type http://dl.example.com/include/config.php and +-verify that you correctly get an "Access Denied" error.

    +-

    If you use Apache, the provided .htaccess files should be already +-sufficient; consult your web server documentation otherwise.

    +-
  • +-
  • Create a spool directory that will be used by the service to store the files, +-user and ticket information. This directory should be outside of the +-document root of your web server. Fix the permissions so that PHP has +-read/write access to it.

    +-

    In the provided include/config.php this is configured as +-/var/spool/dl. If you web server runs as "nobody:nogroup", issue:

    +-
    +-mkdir -p -m770 /var/spool/dl
    +-chgrp nogroup /var/spool/dl
    +-
    +-

    to create correctly this directory.

    +-
  • +-
  • Create a database (as described in Database setup).

    +-
  • +-
  • Create at least one user (as described in Internal authentication).

    +-
  • +-
+-
+-
+-

Database setup

+-

DL needs a database to store the ticket and user information. By default, DL +-will use an embedded "sqlite" database stored within the spool directory, but +-some manual setup is still required.

+-

To create the database, you need the sqlite3 command. +-On Ubuntu/Debian, sqlite3 can by installed by executing:

+-
+-sudo apt-get install sqlite3
+-
+-

You should then execute the provided SQL batch for SQLite with the same user +-as your web server (by using su or sudo if necessary):

+-
+-cd /var/spool/dl/
+-sqlite3 data.sdb < /your-installation-directory/include/scripts/db/sqlite.sql
+-chmod 660 data.sdb
+-
+-

If you want to change the database path, or use a real database server, you +-need to properly configure the $dsn parameters in include/config.php +-according to your setup. The DSN string changes according to the PDO module +-that you want to use. Please see one of:

+- +-

for the most popular configuration choices. When a username/password is +-required, using the appropriate variables $dbUser/$dbPassword is +-preferred instead of embedding the values in the DSN string.

+-

The directory include/scripts/db/ provides SQL initialization scripts for +-SQLite, MySQL and PostgreSQL.

+-
+-
+-

PHP setup

+-

The following parameters are required to be set in your php.ini:

+-
    +-
  • date.timezone: must be set to your system preference.
  • +-
  • session.auto_start: must be "Off".
  • +-
+-

The maximal upload limit is determined by several PHP configuration parameters. +-Check your php.ini for:

+-
    +-
  • upload_max_filesize: change as needed.
  • +-
  • post_max_size: must be at least 1M larger than upload_max_filesize.
  • +-
  • session.gc_maxlifetime: must be long enough to allow large uploads to finish.
  • +-
+-

All the above settings can be configured per-directory and affect only DL. In +-addition, the following parameters need to be set for the entire PHP server:

+-
    +-
  • file_uploads: must be "On".
  • +-
  • upload_tmp_dir: ensure enough space is available for temporary files.
  • +-
  • max_file_uploads: change as needed.
  • +-
+-

The upload limit as shown in the submission form is determined automatically +-from the upload_max_filesize parameter.

+-

Any upload beyond post_max_size will be completely ignored: users will get +-a blank page instead of an error message. You should raise post_max_size +-above upload_max_filesize to get an acceptable "error window" in old +-browsers or browsers with JavaScript disabled.

+-

session.gc_maxlifetime (which is in seconds) needs to be long enough for +-your users to complete a large upload. Uploading 500MB on a slow ADSL +-connection can take as much as 12 hours, so set it to at least 43200.

+-

If PHP was built as an Apache module you can set per-directory parameters +-through .htaccess (see +-http://www.php.net/manual/en/configuration.changes.php) or directly inside your +-Apache's configuration (see Apache/mod_php for an example). The provided +-htdocs/.htaccess contains a reasonable pre-set, but requires +-AllowOverride All to be set for the directory in your main configuration.

+-
+-
+-

User setup

+-

DL can use both an internal and an external user database, by trusting the +-authentication credentials provided by your web server.

+-

dl supports both "normal" users and "administrators". A normal user can only +-see and manage tickets created by himself. Administrators can see/manage all +-the tickets.

+-
+-

Internal authentication

+-

Once dl has been installed and PHP is set-up correctly, you have to create at +-least one user to be able to log in. User management is handled through the +-command line by using the bundled useradmin.php utility.

+-

On the server, execute the following commands with the same user as your web +-server (by using su or sudo if necessary):

+-
+-cd /your-installation-directory/include/scripts
+-php useradmin.php add "admin" "true" "change me"
+-
+-

where:

+-
    +-
  • admin is the user name
  • +-
  • true (or false) sets the administrator status
  • +-
  • change me is the password
  • +-
+-

Repeat as many times as necessary. You should now be able to use the web +-service. Other users/administrators can be added through the web interface.

+-
+-
+-

External authentication

+-

External authentication should be the preferred form of authentication for +-corporate use since it supports whatever authentication scheme your web server +-already supports (for example, LDAP, ActiveDirectory, etc).

+-

To enable external authentication you have to protect the two files:

+-
    +-
  • admin.php
  • +-
  • rest.php
  • +-
+-

using a "Basic" authentication scheme. You should then set $authRealm to +-the same authentication realm used in your web server. The other files must +-not be protected.

+-

DL will implicitly trust the credentials provided by the web server. All users +-are logged in as "normal" by default. The only setup required is adding the +-administrators with useradmin.php without using any password.

+-

Logout with HTTP authentication is not guaranteed to work: users should simply +-close their browser to clear their session (closing a tab or window is not +-enough in many browsers). Currently, logout works as expected on:

+-
    +-
  • Firefox
  • +-
  • Safari
  • +-
  • Google Chrome/Chromium
  • +-
+-

Logout does not work on:

+-
    +-
  • Internet Explorer 7/8.
  • +-
  • Opera 9/10.
  • +-
+-

Again, only the Basic authentication is supported, which transmits the +-password in clear-text unless you use SSL.

+-

When using external authentication, the HTTP header USER_EMAIL can +-additionally provide the user's default email address. Such header is provided +-automatically, for example, when using "LemonLDAP::NG".

+-
+-
+-
+-

Large file support

+-

Large file support (for uploads larger than 2GB) requires a combination of PHP +-version, web server and browser support.

+-

Apache 2.2 and above support large request bodies but needs to be built for +-64bit (see LimitRequestBody). Same for Lighttpd 1.4 (>2gb but only for +-64bit builds, see server.max-request-size).

+-

Due to several bugs in PHP prior to 5.6, upload_max_filesize and +-post_max_size are limited to a 31/32bit integer, which limits the upload +-size to 2/4GB even on 64bit systems. The maximal uploadable sizes are shown +-below:

+- +-+-+-+- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
PHP VersionUpload limit
<5.42gb: post_max_size = 2147483647
5.4-5.54gb: post_max_size = 4294967295
>=5.6no limit
+-

Note that PHP versions before 5.5 are no longer supported, and older versions +-are shown here for reference purposes only.

+-

Finally, not all browsers support large file uploads:

+- +-+-+-+- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
BrowserUpload limit
IE <= 82gb
IE >= 9no limit
Firefox <= 162gb
Firefox >= 17no limit
Chromeno limit
Opera >= 10no limit
+-

Sources:

+- +-
+-
+-
+-

Web-server Configuration

+-
+-

Apache/mod_php

+-

With internal authentication:

+-
+-<Directory /your-installation-directory>
+-  AcceptPathInfo On
+-  AllowOverride Limit
+-  Options -Indexes
+-  DirectoryIndex index.php index.html
+-</Directory>
+-
+-

With external authentication:

+-
+-<Directory /your-installation-directory>
+-  # Normal DL configuration
+-  AcceptPathInfo On
+-  AllowOverride Limit
+-  Options -Indexes
+-  DirectoryIndex index.php index.html
+-
+-  # Require a Basic authentication scheme for admin/rest.php
+-  <FilesMatch "^(admin|rest)\.php$">
+-    # The scheme must be Basic
+-    AuthType Basic
+-    AuthName "Restricted Area"
+-    Require valid-user
+-    Satisfy any
+-
+-    # You'll need to provide a valid source for passwords using either the
+-    # following or some other authentication source (such as LDAP)
+-    AuthBasicProvider file
+-    AuthUserFile /path/to/passwd/file
+-  </FilesMatch>
+-</Directory>
+-
+-

With LDAP or ActiveDirectory authentication:

+-
+-<Directory /your-installation-directory>
+-  # Normal DL configuration
+-  AcceptPathInfo On
+-  AllowOverride Limit
+-  Options -Indexes
+-  DirectoryIndex index.php index.html
+-
+-  # Require a Basic authentication scheme for admin/rest.php
+-  <FilesMatch "^(admin|rest)\.php$">
+-    # The scheme must be Basic
+-    AuthType Basic
+-    AuthName "Restricted Area"
+-    Require valid-user
+-    Satisfy any
+-
+-    # Use the LDAP provider (just an example query)
+-    AuthBasicProvider ldap
+-    AuthzLDAPAuthoritative off
+-    AuthLDAPURL ldap://XXXXXX:XXXX/ou=XXXX,dc=XXXX,dc=XXX?sAMAccountName?sub?(objectClass=*)
+-    AuthLDAPBindDN "cn=XXXX,ou=XXXXX,dc=XXX,dc=XXX"
+-    AuthLDAPBindPassword "XXXXX"
+-  </FilesMatch>
+-</Directory>
+-
+-
+-
+-

Apache/FastCGI

+-

FastCGI support in Apache up to 2.2.x is severely lacking with all the +-available modules: mod_fcgi, mod_fcgid (now merged officially into +-Apache's mod_fcgi) and mod_fastcgi.

+-
    +-
  • mod_fcgi and mod_fcgid buffer the entire request in memory before +-handing-off the request to PHP, meaning that the maximal upload limit is +-bound to your available memory at the time of the request, independently of +-how PHP is setup. This is a known, old bug that's still present in both +-mod_fcgi 2.2.14 and mod_fcgid 2.3.4. There is no known work-around: +-either use mod_php or use a different server.
  • +-
  • mod_fastcgi has been proved to be slow (and sometimes unstable) in most +-configurations. It is not advisable to use PHP with mod_fastcgi.
  • +-
+-

For the REST service to work, independently of the authentication method, +-mod_rewrite needs to be enabled and configured as follows:

+-
+-<Directory /your-installation-directory>
+-  # Normal DL configuration
+-  AcceptPathInfo On
+-  AllowOverride Limit
+-  Options -Indexes
+-  DirectoryIndex index.php index.html
+-
+-  <FilesMatch "^(admin|rest)\.php$">
+-    # Forward the credentials for the PHP process
+-    RewriteEngine on
+-    RewriteCond %{HTTP:Authorization} ^(.*)
+-    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
+-  </FilesMatch>
+-</Directory>
+-
+-

This is required to correctly pass the Authorization header to the PHP +-process.

+-

If you want to enable HTTP/External authentication, just add the usual +-authorization configuration as well:

+-
+-<Directory /your-installation-directory>
+-  # Normal DL configuration
+-  AcceptPathInfo On
+-  AllowOverride Limit
+-  Options -Indexes
+-  DirectoryIndex index.php index.html
+-  <FilesMatch "^(admin|rest)\.php$">
+-    # Forward the credentials for the PHP process
+-    RewriteEngine on
+-    RewriteCond %{HTTP:Authorization} ^(.*)
+-    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
+-
+-    # Require a Basic authentication scheme for admin/rest.php
+-    AuthType Basic
+-    AuthName "Restricted Area"
+-    ...
+-    Require valid-user
+-  </FilesMatch>
+-</Directory>
+-
+-
+-
+-

Lighttpd/FastCGI

+-

PHP/FastCGI works fine with Lighttpd 1.4.x without any special setup. The +-following configuration is required to protect the include directories:

+-
+-$HTTP["url"] =~ "^/dl(?:/|/.*/)include/" {
+-  url.access-deny = ( "" )
+-}
+-
+-

You can also enable external authentication with the following:

+-
+-$HTTP["url"]    =~ "^/dl/(?:admin|rest)\.php$" {
+-  auth.require  += ( "" => (
+-      "method"  => "basic",
+-      "realm"   => "Restricted Area",
+-      "require" => "valid-user"
+-  ) )
+-}
+-
+-
+-
+-

Nginx/FastCGI

+-

Nginx in combination with PHP/FastCGI works fine but needs special configuration to +-setup PATH_INFO correctly. Here is an example configuration with DL +-installed as a subdirectory in the document root:

+-
+-location ^~ /dl {
+-    # Protect the include directories
+-    location ~ ^/dl(?:/|/.*/)include {
+-        deny all;
+-    }
+-
+-    index index.php index.html;
+-    try_files $uri $uri/ =404;
+-
+-    # Enable PHP
+-    location ~ \.php(?:$|/) {
+-        include fastcgi_params;
+-
+-        # Set maximum body size (should be the same as PHP's post_max_size)
+-        client_max_body_size 512M;
+-
+-        # Setup PATH_INFO (http://trac.nginx.org/nginx/ticket/321)
+-        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+-        set $path_info          $fastcgi_path_info;
+-        fastcgi_param PATH_INFO $path_info;
+-
+-        try_files $fastcgi_script_name =404;
+-
+-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+-        fastcgi_index index.php;
+-        fastcgi_pass unix:/var/run/php5-fpm.sock;
+-    }
+-}
+-
+-
+-
+-
+-

Ticket expiration

+-

Ticket expiration can be either performed internally to DL (the default), or by +-using the external include/scripts/expire.php utility with a cron job. This +-preference can be set by controlling the $gcInternal parameter.

+-

The internal method requires no setup, but the external method has the added +-advantage of not interrupting the web interface during the expiration process, +-and also ensures that the spool is emptied when DL itself is not used actively.

+-
+-

Internal method

+-

Expiration is usually performed aggressively at every page request. You can +-control this behavior (thus reducing the DB pressure) by tuning the +-$gcProbability and $gcLimit parameters.

+-

If you notice too much load on your DB, start by lowering $gcProbability to +-0.5 and set $gcLimit to roughly the number of active tickets currently +-present in your DB.

+-

Continue to lower $gcProbability even further until the load becomes +-acceptable. When the load is acceptable, but queries take too long, reduce +-$gcLimit.

+-
+-
+-

External method

+-

Simply call include/scripts/expire.php within a cron job, which should be +-executed with the same user as the web server. Executing the script once a +-day is sufficient for low traffic websites, but can be executed as often as +-needed. $gcLimit still controls how many tickets are expired for each run +-to limit the execution time.

+-
+-
+-
+-

Upgrading from an earlier version

+-
    +-
  • Backup your current config.php file and spool directory.

    +-
  • +-
  • Overwrite the DL installation directory with the new copy.

    +-
  • +-
  • Either copy over the old config.php file or customize the new version.

    +-
  • +-
  • Run dbupgrade.php as your web server user:

    +-
    +-cd /your-installation-directory/include/scripts
    +-php dbupgrade.php
    +-
    +-
  • +-
  • Test your new setup.

    +-
  • +-
+-
+-
+-

Internationalization support

+-

DL has been translated in several languages and will attempt to detect the +-correct locale of the browser and use it automatically when available. If no +-matching translation can be found, a default will be used, which is configured +-to be English in the main distribution. The user can however switch the +-language anytime.

+-

Adding a new translation is easy for anyone familiar with the gettext tools: +-you don't need programming knowledge. If you want to contribute a new language, +-or suggest a better translation, we recommend to subscribe to the mailing list +-and ask for guidance. We really appreciate your help.

+-
+-

Contributing/updating a translation

+-

Contributing a new translation is easy enough:

+-
    +-
  • Edit htdocs/include/lang.php and add your new language name and alias to +-$langData, as done for the other languages.

    +-
  • +-
  • Execute:

    +-
    +-cd htdocs/include/scripts/
    +-./langgen.php
    +-
    +-

    to freshen the strings to be translated.

    +-
  • +-
  • Translate the generated messages.po in the directory +-htdocs/include/locale/<locale_NAME>/LC_MESSAGES/ using a text editor, or +-by using PoEdit, or any other "po" editing tool.

    +-
  • +-
  • Optionally translate the user guide, which is located in +-htdocs/include/static/guide/.

    +-

    Copy the english directory tree into a new tree with the new locale name and +-translate index.rst. index.html is regenerated automatically.

    +-
  • +-
  • To test/update the translations run langupd.php:

    +-
    +-cd htdocs/include/scripts/
    +-./langupd.php
    +-
    +-
  • +-
+-
+-
+-
+-

Usage

+-

DL should be usable by users without any training. The web interface must be +-self-explanatory. If you find the usage to be difficult or that the interface +-could be improved, it's a bug. Please let us know.

+-
+-

Command-line client: dl-cli

+-

A command-line client to the REST interface is included in the distribution in +-client/dl-cli.py. This client requires a simple text configuration file, by +-default stored in ~/.dl.rc, containing the following values:

+-
    +-
  • url: REST URL of the service
  • +-
  • user: your user name
  • +-
  • pass (optional): your password (if not specified, you will be prompted for it +-by the client)
  • +-
  • passcmd (optional): invoke the supplied command to obtain the password
  • +-
  • verify (optional): "true" or "false": enable/disable SSL verification +-(might be required for testing, but defaults to true)
  • +-
  • email (optional): default email address for grant notifications
  • +-
  • fingerprint: Validate the server against the specified certificate or +-fingerprint (See Public key pinning).
  • +-
+-

An example:

+-
+-url=https://dl.example.com/rest.php
+-user=test
+-pass=test
+-
+-

Simply run the command with no arguments to see usage information. At least +-Python 2.7 is required (with Python 3+ being recommended), with the "PycURL" +-and "ConfigObj" modules installed. Under Debian/Ubuntu systems you can install +-the required dependencies by doing the following:

+-
+-sudo apt-get install python3-pycurl python3-configobj
+-
+-
+-
+-

Graphical client: dl-wx

+-

A graphical client is also included in the distribution, which allows to create +-tickets easily from the system's taskbar. The client can be run by executing +-client/dl-wx/dl-wx.py or by downloading an executable client.

+-

Upon first execution the user will be prompted for the basic configuration. +-After that all DL functions can be operated through the taskbar icon:

+-
    +-
  • Left-clicking on the taskbar will create a new ticket using the default +-settings.
  • +-
  • Right-clicking allows to select different actions.
  • +-
  • On OSX, you can drop files directly on the dock.
  • +-
+-

At least Python 2.7 is required, with the "ConfigObj", "PycURL" and "wxPython" +-modules installed. Under Debian/Ubuntu systems you can install the required +-dependencies by doing the following:

+-
+-sudo apt-get install python-pycurl python-configobj python-wxgtk2.8
+-
+-

dl-cli and dl-wx share the same configuration file, so both can be used +-interchangeably.

+-

A dl-wx pre-built binary is also available online on the dl-wx page, which +-includes installation instructions and a simple tutorial.

+-
+-
+-

Public key pinning

+-

The fingerprint option in the ~/.dl.rc configuration file implements +-public key pinning, and supports any value directly accepted by cURL.

+-

It can be a path to a DER/PEM certificate file, or a SHA256 hash of the public +-key of the host. The hash can be either a hex-encoded string (with optional +-colon separators), or a string starting with sha256// and followed by a +-base64-encoded value of the hash.

+-

The quickest way to obtain the fingerprint is to use curl directly:

+-
+-curl -vkI --pinnedpubkey 'sha256//' https://example.com/
+-
+-

Look for the "public key hash" in the generated output.

+-
+-
+-

Thunderbird integration

+-

The bundled extension "Thunderbird-Filelink-DL" integrates with the new +-Thunderbird's Filelink functionality, by using the REST service provided by DL +-0.10 and onward. The extension allows to convert large attachments to links +-automatically, directly within the Composer window.

+-

The extension also allows the user to generate/insert a new upload grant in the +-current message from the composer window. Both a menu command (under "Tools" .. +-"Insert upload grant") and a toolbar item (that you manually need to drag in +-the composer toolbar) are provided.

+-

To install the extension, go to Thunderbird's "Tools" .. "Addons" menu, and +-click on the "Settings" icon just next to the search bar. Select "Install +-Add-on from file..." and choose the file client/thunderbird-filelink-dl.xpi +-as provided in the distribution.

+-

See full installation and usage instructions on the extension web page.

+-
+-
+-
+-

General/support mailing list

+-
+-
<dl-ticket-service@thregr.org>:
+-
Go-to list for general discussions, troubleshooting and suggestions. You can +-subscribe to dl-ticket-service by either sending an empty email to +-<dl-ticket-service+subscribe@thregr.org> or by using GMane (group +-"gmane.comp.web.dl-ticket-service.general"). The archives are accessible via +-web through https://www.mail-archive.com/dl-ticket-service@thregr.org/ or +-via news directly.
+-
<dl-announces@thregr.org>:
+-
DL release (and release candidate) announcements (read-only list). Very low +-traffic. To subscribe, send an email to <dl-announces+subscribe@thregr.org>.
+-
<dl-translators@thregr.org>:
+-
Mailing list reserved for translators coordination.
+-
+-

You can contact the main author directly at <wavexx@thregr.org>, though using +-the general list is encouraged.

+-
+-
+-

Customisation and development

+-

You are encouraged to change DL as you see fit under the terms of the GNU GPL 2 +-license, or (at your option) any later version. DL's GIT repository is publicly +-accessible at:

+-
+-https://github.com/DownloadTicketService/dl
+-

or at git://src.thregr.org/dl

+-
+-

Development releases

+-

Development releases directly downloaded from git do not include pre-processed +-files. To build the localization data gettext and docutils need to be +-installed. You'll then need to execute:

+-
+-cd htdocs/include/scripts/
+-./langupd.php
+-
+-

To build the Thunderbird add-on, the Thunderbird SDK needs to be installed as +-well. You might need to change the paths inside +-client/thunderbird-filelink-dl/config_build.sh (which is tuned for Debian's +-thunderbird-dev package) and execute:

+-
+-cd client/thunderbird-filelink-dl/
+-./build.sh
+-
+-

Database schema changes are not gracefully handled while following a +-development release. Do not run development releases on a production +-environment.

+-
+-
+- +-
+- +- +diff -Nur dl-0.18.1/README.rst dl-master/README.rst +--- dl-0.18.1/README.rst 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/README.rst 2021-03-16 18:59:58.000000000 -0400 +@@ -302,7 +302,6 @@ + AuthType Basic + AuthName "Restricted Area" + Require valid-user +- Satisfy any + + # You'll need to provide a valid source for passwords using either the + # following or some other authentication source (such as LDAP) +@@ -326,7 +325,6 @@ + AuthType Basic + AuthName "Restricted Area" + Require valid-user +- Satisfy any + + # Use the LDAP provider (just an example query) + AuthBasicProvider ldap +@@ -697,7 +695,7 @@ + You can contact the main author directly at , though using + the general list is encouraged. + +-.. _GMane: http://www.gmane.org/ ++.. _GMane: https://news.gmane.io/ + + + Customisation and development +diff -Nur dl-0.18.1/RESTAPI.html dl-master/RESTAPI.html +--- dl-0.18.1/RESTAPI.html 2017-09-06 12:09:40.000000000 -0400 ++++ dl-master/RESTAPI.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,656 +0,0 @@ +- +- +- +- +- +- +-DL REST API +- +- +- +-
+-

DL REST API

+- +- +-

Since version 0.10 DL offers a "RESTful" HTTP API that allows inter-operation +-between other services and/or native programs easily.

+-
+-

Outline of the API

+-

Every request is gated through the "/rest.php" page (or simply "/rest", +-depending on the configuration), which is directly on the root of the web +-service, for example:

+-
+-https://dl.example.com/rest.php
+-
+-

Each action is directly appended to the URI space, followed by parameters (if +-any):

+-
+-/rest/request[/parameters]
+-
+-

Every request must be performed via the appropriate HTTP method (either "GET" +-or "POST"), and must always include HTTP's "Basic" authorization credentials.

+-

The credentials must also be replicated in a second header "X-Authorization" +-(which follows the same syntax as a normal "Basic" authorization scheme).

+-

"POST" requests are x-www-form-urlencoded and must also include:

+-
    +-
  • A JSON-encoded "msg" parameter, with arguments defined by the request. This +-parameter should always be present, even when empty.
  • +-
  • When needed, a "file" parameter with the file to be attached.
  • +-
+-

The output of every request can be:

+-
    +-
  • An HTTP error code only (400, 401, 500, etc).

    +-
  • +-
  • An HTTP error code with a JSON-encoded message with an "error" term:

    +-
    +-{"error":"error description"}
    +-
    +-
  • +-
  • A successful HTTP status (200), with a JSON-encoded message (even if empty) +-containing the specific request output.

    +-
  • +-
+-
+-
+-

Available requests

+-
+-

info

+-

An "info" request returns the service defaults and statistics.

+-

Since: 0.10

+-

Request method: "GET"

+-

Request parameters: None

+-

Returned values:

+-
    +-
  • version (string): DL version.
  • +-
  • masterpath (string): root URL of the service.
  • +-
  • url (string): configurable reference URL for the service.
  • +-
  • maxsize (integer): maximum upload size (in bytes).
  • +-
  • defaults: service defaults:
      +-
    • grant:
        +-
      • total (integer): maximal number of seconds for grants.
      • +-
      • lastul (integer, since 0.18): maximal number of seconds after last upload for grants.
      • +-
      • maxul (integer, since 0.18): maximal number of uploads for grants.
      • +-
      +-
    • +-
    • ticket:
        +-
      • total (integer): maximal number of seconds for tickets.
      • +-
      • lastdl (integer): maximal number of seconds after last download for tickets.
      • +-
      • maxdl (integer): maximal number of downloads for tickets.
      • +-
      +-
    • +-
    +-
  • +-
+-

Example request:

+-
+-GET /rest/info HTTP/1.0
+-Host: dl.example.com
+-Authorization: Basic dGVzdDp0ZXN0
+-X-Authorization: Basic dGVzdDp0ZXN0
+-
+-

Example answer:

+-
+-HTTP/1.1 200 OK
+-Content-Type: application/json
+-
+-
+-{
+-  "version": "0.11",
+-  "url": "http:\/\/www.thregr.org\/~wavexx\/software\/dl\/",
+-  "masterpath": "http:\/\/dl.example.com\/",
+-  "maxsize": 209715200,
+-  "defaults":
+-  {
+-    "grant":
+-    {
+-      "total": 31536000
+-    },
+-    "ticket":
+-    {
+-      "total": 31536000,
+-      "lastdl": 2592000,
+-      "maxdl": 0
+-    }
+-  }
+-}
+-
+-
+-
+-

newticket

+-

A "newticket" request creates a new ticket.

+-

Since: 0.10

+-

Request method: "POST"

+-

Request parameters: None

+-

POST "msg" object parameters:

+-
    +-
  • comment (string): comment for the ticket.
  • +-
  • pass (string): password required for the ticket.
  • +-
  • pass_send (boolean, since: 0.18): send password in email notifications +-(defaults to true when unset)
  • +-
  • ticket_total (integer): maximal number of seconds.
  • +-
  • ticket_lastdl (integer): maximal number of seconds after last download.
  • +-
  • ticket_maxdl (integer): maximal number of downloads for the ticket.
  • +-
  • notify (string): notification addresses (comma-separated list of e-mails).
  • +-
  • send_to (string): send-link-to addresses (comma-separated list of e-mails).
  • +-
  • permanent (boolean): Same as ticket_expiry=never.
  • +-
  • ticket_expiry (choice: auto/once/never/custom, since: 0.18): +-+-+- +- +- +- +- +- +- +- +- +- +-
    auto:use server's defaults for ticket expiration
    once:same as ticket_maxdl=1 with server's default ticket_total
    never:same as ticket_total/ticket_lastdl/ticket_maxdl=0
    custom:requires explicit ticket_total/ticket_lastdl/ticket_maxdl
    +-
  • +-
+-

POST "file" parameter:

+-
    +-
  • File to be attached (mandatory).
  • +-
+-

Returned values:

+-
    +-
  • id (string): ticket ID.
  • +-
  • url (string): ticket URL.
  • +-
+-
+-
+-

newgrant

+-

A "newgrant" request creates a new grant.

+-

Since: 0.13

+-

Request method: "POST"

+-

Request parameters: None

+-

POST "msg" object parameters:

+-
    +-
  • notify (string): notification address (mandatory).
  • +-
  • comment (string): comment for the grant/ticket.
  • +-
  • pass (string): password required for the grant/ticket.
  • +-
  • pass_send (boolean, since: 0.18): send password in email notifications +-(defaults to true when unset)
  • +-
  • grant_total (integer): maximal number of seconds.
  • +-
  • grant_lastul (integer, since: 0.18): maximal number of seconds after the last +-upload has been triggered.
  • +-
  • grant_maxul (integer, since: 0.18): maximal number of uploads for the grant.
  • +-
  • grant_expiry (choice: auto/once/never/custom, since: 0.18): +-+-+- +- +- +- +- +- +- +- +- +- +-
    auto:use server's defaults for grant expiration
    once:same as grant_maxul=1 with server's default grant_total
    never:same as grant_total/grant_lastul/grant_maxul=0
    custom:requires explicit grant_total/grant_lastul/grant_maxul
    +-
  • +-
  • ticket_total (integer): maximal number of seconds.
  • +-
  • ticket_lastdl (integer): maximal number of seconds after last download.
  • +-
  • ticket_maxdl (integer): maximal number of downloads for the ticket.
  • +-
  • send_to (string): send-link-to addresses (comma-separated list of e-mails).
  • +-
  • ticket_permanent (boolean): Same as ticket_expiry=never.
  • +-
  • ticket_expiry (choice: auto/once/never/custom, since: 0.18): +-+-+- +- +- +- +- +- +- +- +- +- +-
    auto:use server's defaults for ticket expiration
    once:same as ticket_maxdl=1 with server's default ticket_total
    never:same as ticket_total/ticket_lastdl/ticket_maxdl=0
    custom:requires explicit ticket_total/ticket_lastdl/ticket_maxdl
    +-
  • +-
+-

Returned values:

+-
    +-
  • id (string): grant ID.
  • +-
  • url (string): grant URL.
  • +-
+-
+-
+-

purgeticket

+-

A "purgeticket" request deletes a ticket ID and its associated file, notifying +-the owner (if requested).

+-

Since: 0.11

+-

Request method: "POST"

+-

Request parameters:

+-
    +-
  • ticket-id: mandatory
  • +-
+-

POST "msg" object parameters: None

+-

Returned values: None

+-

Example request:

+-
+-POST /rest/purgeticket/c1e3c2e0b6d5d0f0ada292c081fc4c49 HTTP/1.0
+-Host: dl.example.com
+-Authorization: Basic dGVzdDp0ZXN0
+-X-Authorization: Basic dGVzdDp0ZXN0
+-Content-Type: application/x-www-form-urlencoded
+-
+-msg={}
+-
+-

Example answer:

+-
+-HTTP/1.1 200 OK
+-Content-Type: application/json
+-
+-{}
+-
+-
+-
+-
+-

curl examples

+-

curl can be used to easily fiddle with the REST API.

+-

A minimal request to create a new ticket can be performed with the following +-command:

+-
+-curl https://dl.example.com/rest.php/newticket \
+-  -F file=@filename -F msg={} \
+-  -H 'Authorization: Basic dGVzdDp0ZXN0' \
+-  -H 'X-Authorization: Basic dGVzdDp0ZXN0'
+-
+-

@filename is a special curl syntax that specifies the path to the +-filename to be posted. The basic authorization data is provided manually, as +-it needs to be replicated in the non-standard header "X-Authorization" anyway +-(this is used as a secondary token to prevent CSRF). You can construct the +-authorization hash on the command-line as well with the following:

+-
+-echo -n 'user:password' | base64
+-
+-

Please keep in mind command-line arguments are usually visible to other users +-running on the same system, potentially exposing your password.

+-
+-
+-

Programming APIs

+-
+-

Python

+-

A Python API, supporting both asynchronous/synchronous operations and progress +-support can be found in the client/dl-wx/dl.py file. The API is used both +-by dl-wx.py and dl-cli.py in the same directory.

+-

A simpler stand-alone implementation which can be helpful for testing can be +-found at client/dl-cli.py.

+-
+-
+-
+- +- +diff -Nur dl-0.18.1/THANKS.html dl-master/THANKS.html +--- dl-0.18.1/THANKS.html 2017-09-06 12:09:40.000000000 -0400 ++++ dl-master/THANKS.html 1969-12-31 19:00:00.000000000 -0500 +@@ -1,464 +0,0 @@ +- +- +- +- +- +- +-Download Ticket Service credits +- +- +- +-
+-

Download Ticket Service credits

+- +-
+-Development for "Download Ticket Service" has been sponsored in large part by +-the EURAC's Institute of Genetic Medicine.
+-
+-

List of major contributors in alphabetical order:

+-

Arthur Fabre [https://github.com/arthurfabre]:

+-
    +-
  • dl-cli improvements.
  • +-
+-

Clemens Egger <clemens.egger@eurac.edu>:

+-
    +-
  • Suggestions and testing.
  • +-
  • German UI/Guide translation.
  • +-
+-

Daniel Berteaud <daniel@firewall-services.com>:

+-
    +-
  • French translation.
  • +-
  • Several patches, webSSO support.
  • +-
  • Additional testing.
  • +-
+-

Daniele Di Domizio <daniele.didomizio@eurac.edu>:

+-
    +-
  • Additional testing.
  • +-
+-

Emanuele Rosati <emanuele.rosati@gmail.com>:

+-
    +-
  • Suggestions and layout fixes.
  • +-
+-

Fabiola Del Greco <fabiola.delgreco@eurac.edu>:

+-
    +-
  • Spanish UI translation.
  • +-
+-

Guangyu Dong <skyerce@gmail.com>:

+-
    +-
  • Simplified Chinese translation.
  • +-
+-

Guilherme Benkenstein <gb@gbti.com.br>:

+-
    +-
  • Brazilian Portuguese translation.
  • +-
+-

Hervé Commowick <hcommowick@exosec.fr>:

+-
    +-
  • Progress bar patch.
  • +-
+-

Jan Štětina <zaantar@gmail.com>:

+-
    +-
  • Czech translation.
  • +-
+-

Johannes Martin <johannes.martin@eurac.edu>:

+-
    +-
  • Android client.
  • +-
+-

Kim Thostrup <kim@thostrup.dk>:

+-
    +-
  • DL 0.3 Skin.
  • +-
  • Suggestions and testing.
  • +-
+-

Larissa de Clauser <larissa.declauser@eurac.edu>:

+-
    +-
  • German Guide translation.
  • +-
+-

Maarten Schoonman <m.s.schoonman@home.nl>:

+-
    +-
  • Dutch translation.
  • +-
+-

Mokrani Rachid <rachid.mokrani@ifpenergiesnouvelles.fr>:

+-
    +-
  • Suggestions and testing.
  • +-
  • French UI/Guide translation.
  • +-
+-

Олейник О.В <oleg_oleinik@mail.ru>:

+-
    +-
  • Russian translation.
  • +-
+-

Roberto Salgado <drober@gmail.com>:

+-
    +-
  • Spanish UI/Guide translation.
  • +-
  • Docker image maintenance.
  • +-
+-

RustyPixel [https://github.com/RustyPixel]:

+-
    +-
  • DL 0.14 Skin.
  • +-
+-

Sébastien Le Ray <sebastien-github@orniz.org>:

+-
    +-
  • Thunderdbird and DL code fixes.
  • +-
  • French translation.
  • +-
+-

Teruo IWAI <oteru@nak.ics.keio.ac.jp>:

+-
    +-
  • Japanese localization.
  • +-
+-

Tim Booth <tbooth@ceh.ac.uk>:

+-
    +-
  • Suggestions and fixes.
  • +-
+-
+- +- +diff -Nur dl-0.18.1/THANKS.rst dl-master/THANKS.rst +--- dl-0.18.1/THANKS.rst 2017-09-06 12:08:38.000000000 -0400 ++++ dl-master/THANKS.rst 2021-03-16 18:59:58.000000000 -0400 +@@ -29,6 +29,10 @@ + + * Additional testing. + ++Dirk Reimers : ++ ++* Code auditing ++ + Emanuele Rosati : + + * Suggestions and layout fixes. diff --git a/dl-0.18.1.zip b/dl-0.18.1.zip new file mode 100644 index 0000000..d4a0740 --- /dev/null +++ b/dl-0.18.1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a9be2061c1a7d0a256029a796bbef41d77563d15f36715d346877435e25e0ce +size 1958327 diff --git a/dl.spec b/dl.spec new file mode 100644 index 0000000..f6ea1c9 --- /dev/null +++ b/dl.spec @@ -0,0 +1,203 @@ +%define name dl +%define version 0.18.1 +%define release 4 +%define httpuser apache + +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 5 +%global useselinux 1 +%else +%global useselinux 0 +%endif + +Summary: Temporary file hosting +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: GPLv2 +URL: http://www.thregr.org/~wavexx/software/dl/ +Group: Applications/Internet +Source: http://www.thregr.org/~wavexx/software/dl/releases/%{name}-%{version}.zip +Source1: httpd.conf +Source2: logrotate.conf +Patch0: dl-0.18.1-pre0.19changes20210316.patch +Patch1: dl-0.18.1-add-in-help-html.patch + +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version} + +Requires: php >= 5.3 +Requires: php-mbstring +Requires: httpd +Requires: gettext +Requires(post): sqlite +%if %{useselinux} +Requires: %{_sbindir}/semanage +%endif + +BuildRequires: php-cli >= 5.3 +BuildRequires: php-mbstring +BuildRequires: gettext +BuildRequires: python-docutils + +%package cli +Summary: A command line client for dl +Group: Applications/Internet +Requires: python-pycurl + +%description +"dl" is a file exchange service that allows you to upload any +file to a web server and generate a unique ticket for others +to download. The ticket is automatically expired according to +the specified rules, so that you don't need to keep track or +cleanup afterward. "dl" also allows you to grant an anonymous, +one-time upload for others to send you a file, without the +requirement of account management. + +%description cli +A command-line client to the REST interface of dl + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 +%patch1 -p1 + +%build +# update locales +pushd ./htdocs/include/scripts +php ./langupd.php +popd + + +%install +%{__rm} -rf %{buildroot} +%{__mkdir_p} %{buildroot}/%{_datadir}/%{name}/ +%{__mkdir_p} %{buildroot}/%{_localstatedir}/lib/%{name}/tmp +%{__mkdir_p} %{buildroot}/%{_localstatedir}/lib/%{name}/data +%{__mkdir_p} %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +%{__mkdir_p} %{buildroot}/%{_sysconfdir}/logrotate.d/ +%{__mkdir_p} %{buildroot}/%{_bindir} + +%{__cp} -pr ./htdocs/* %{buildroot}/%{_datadir}/%{name}/ + +# Install conf +sed -i -e "s|/var/spool/dl/|/%{_localstatedir}/lib/%{name}|g" \ + %{buildroot}/%{_datadir}/%{name}/include/config.php.dist > \ + %{buildroot}/%{_sysconfdir}/%{name}.php +%{__rm} -f %{buildroot}/%{_datadir}/%{name}/include/config.php.dist + +# Install apache conf +%{__install} -m 0640 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf + +# Install logrotate conf +%{__install} -m 0640 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} + +# Install cli +%{__install} -m 0755 client/dl-cli.py %{buildroot}/%{_bindir}/%{name}-cli + +%clean +rm -rf %{buildroot} + +%post +%if %{useselinux} +( +# New File context +semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_localstatedir}/lib/%{name}(/.*)?" +semanage fcontext -a -s system_u -t httpd_var_lib_t -r s0 "%{_sysconfdir}/%{name}.php" +semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_localstatedir}/log/%{name}.log" +# files created by app +restorecon -R %{_sysconfdir}/%{name}.php +restorecon -R %{_localstatedir}/lib/%{name} +restorecon -R "%{_localstatedir}/log/%{name}.log" +) &>/dev/null || : +%endif +# Initialize database +if [ ! -e %{_localstatedir}/lib/%{name}/data.sql ]; then + cd %{_localstatedir}/lib/%{name}/ + sqlite3 data.sql < %{_datadir}/%{name}/include/scripts/db/sqlite.sql + chown %{httpuser}:%{httpuser} data.sql +fi +# create log file if it doesn't exists +touch %{_localstatedir}/log/%{name}.log +chgrp %{httpuser} %{_localstatedir}/log/%{name}.log +chmod 660 %{_localstatedir}/log/%{name}.log + +# Flush existing session on upgrades +%{__rm} -f %{_localstatedir}/lib/%{name}/tmp/sess_* + +%postun +%if %{useselinux} +if [ "$1" -eq "0" ]; then + # Remove the File Context + ( + semanage fcontext -d "%{_localstatedir}/lib/%{name}(/.*)?" + semanage fcontext -d "%{_sysconfdir}/%{name}.php" + semanage fcontext -d "%{_localstatedir}/log/%{name}.log" + ) &>/dev/null || : +fi +%endif + + +%files +%defattr(-,root,root) +%doc AUTHORS.rst NEWS.rst README.rst RESTAPI.rst THANKS.rst COPYING.txt +#%doc AUTHORS.html NEWS.html README.html RESTAPI.html THANKS.html + +%{_datadir}/%{name} +%dir %attr(770,root,%{httpuser}) %{_localstatedir}/lib/%{name} +%dir %attr(770,root,%{httpuser}) %{_localstatedir}/lib/%{name}/data +%dir %attr(770,root,%{httpuser}) %{_localstatedir}/lib/%{name}/tmp +%config(noreplace) %attr(660,root,%{httpuser}) %{_sysconfdir}/%{name}.php +%config(noreplace) %attr(660,root,root) %{_sysconfdir}/httpd/conf.d/%{name}.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} + +%files cli +%defattr(-,root,root) +%{_bindir}/%{name}-cli + +%changelog +* Thu Oct 09 2025 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Fri Oct 01 2021 Brian Read 0.18.1-4.sme +- Add in missing help files [SME: 11565] + +* Sun Apr 18 2021 Jean-Philippe Pialasse 0.18.1-3.sme +- first build for SME10 [SME: 11565] +- patch with git update up to pre 0.19 release as per 20210316 +- cvs admin -ko on patch + +* Wed Sep 6 2017 Daniel Berteaud 0.18.1-1 +- Update to 0.18.1 + +* Tue Sep 5 2017 Daniel Berteaud 0.18-1 +- Update to 0.18 +- Remove the clamd patch + +* Sun May 29 2016 Daniel Berteaud 0.17.1-2 +- Create the data dir and grant httpd user access + +* Mon May 9 2016 Daniel Berteaud 0.17.1-1 +- Update to 0.17.1 + +* Mon Jun 29 2015 Daniel B. 0.17-1 +- Update to 0.17 + +* Fri Jan 23 2015 Daniel B. 0.16-1 +- Update to 0.16 + +* Thu Dec 4 2014 Daniel B. 0.15-1 +- Upgrade to 0.15 + +* Mon Oct 20 2014 Daniel B. 0.14-1 +- Upgrade to 0.14 + +* Thu Jul 31 2014 Daniel B. 0.13-1 +- Upgrade to 0.13 + +* Wed Dec 11 2013 Daniel B. 0.12-1 +- upgrade to 0.12 + +* Fri Nov 22 2013 Daniel B. 0.11-1 +- First package + diff --git a/httpd.conf b/httpd.conf new file mode 100644 index 0000000..08ba286 --- /dev/null +++ b/httpd.conf @@ -0,0 +1,22 @@ +Alias /dl /usr/share/dl + + + Options None + AllowOverride Limit + AddType application/x-httpd-php .php + php_admin_value open_basedir /usr/share/dl:/var/lib/dl:/etc/dl.php:/var/log/dl.log + php_admin_flag file_uploads On + php_admin_flag magic_quotes Off + php_admin_flag magic_quotes_gpc Off + php_admin_value upload_max_filesize 1024M + php_admin_value post_max_size 1025M + php_admin_value memory_limit 100M + php_admin_flag output_buffering Off + php_admin_value max_execution_time 0 + php_admin_value upload_tmp_dir /var/lib/dl/tmp + php_admin_value session.save_path /var/lib/dl/tmp + php_admin_value session.gc_maxlifetime 86400 + order deny,allow + deny from all + allow from 127.0.0.1 + diff --git a/logrotate.conf b/logrotate.conf new file mode 100644 index 0000000..e5cde2e --- /dev/null +++ b/logrotate.conf @@ -0,0 +1,8 @@ +/var/log/dl.log { + missingok + weekly + rotate 24 + compress + notifempty + copytruncate +}