Merge branch 'master' into php8

This commit is contained in:
El RIDO 2022-07-31 08:53:52 +02:00
commit 8c2cc18b66
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
9 changed files with 1815 additions and 22 deletions

View File

@ -33,11 +33,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -46,4 +46,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v2

View File

@ -13,7 +13,7 @@ jobs:
steps: steps:
- name: Checkout php8 branch - name: Checkout php8 branch
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
# directly checkout the php8 branch # directly checkout the php8 branch
ref: php8 ref: php8

View File

@ -13,7 +13,7 @@ jobs:
snyk-php: snyk-php:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v3
- name: Install Google Cloud Storage - name: Install Google Cloud Storage
run: composer require --no-update google/cloud-storage && composer update --no-dev run: composer require --no-update google/cloud-storage && composer update --no-dev
- name: Run Snyk to check for vulnerabilities - name: Run Snyk to check for vulnerabilities

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Validate composer.json and composer.lock - name: Validate composer.json and composer.lock
run: composer validate run: composer validate
- name: Install dependencies - name: Install dependencies
@ -27,7 +27,7 @@ jobs:
# let's get started! # let's get started!
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
# cache PHP extensions # cache PHP extensions
- name: Setup cache environment - name: Setup cache environment
@ -39,7 +39,7 @@ jobs:
key: ${{ runner.os }}-${{ env.extensions-cache-key }} key: ${{ runner.os }}-${{ env.extensions-cache-key }}
- name: Cache extensions - name: Cache extensions
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ${{ steps.extcache.outputs.dir }} path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }} key: ${{ steps.extcache.outputs.key }}
@ -76,7 +76,7 @@ jobs:
shell: bash shell: bash
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/composer.json') }} key: ${{ runner.os }}-composer-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/composer.json') }}
@ -99,23 +99,23 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '12' node-version: '16'
cache: 'npm' cache: 'npm'
cache-dependency-path: 'js/package.json' cache-dependency-path: 'js/package-lock.json'
- name: Setup Mocha - name: Setup Mocha
run: npm install -g mocha run: npm install -g mocha
- name: Setup Node modules - name: Setup Node modules
run: npm install run: npm ci
working-directory: js working-directory: js
- name: Run unit tests - name: Run unit tests
run: mocha run: npm test
working-directory: js working-directory: js

View File

@ -3,6 +3,8 @@
* **1.4.1 (not yet released)** * **1.4.1 (not yet released)**
* ADDED: Translations for Turkish * ADDED: Translations for Turkish
* CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919) * CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919)
* FIXED: Revert to CREATE INDEX without IF NOT EXISTS clauses, to support MySQL (#943)
* FIXED: Apply table prefix to indexes as well, to support multiple instances sharing a single database (#943)
* **1.4 (2022-04-09)** * **1.4 (2022-04-09)**
* ADDED: Translations for Corsican, Estonian, Finnish and Lojban * ADDED: Translations for Corsican, Estonian, Finnish and Lojban
* ADDED: new HTTP headers improving security (#765) * ADDED: new HTTP headers improving security (#765)

View File

@ -2,7 +2,7 @@
"PrivateBin": "PrivateBin", "PrivateBin": "PrivateBin",
"%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.": "%s es un \"pastebin\" en línea minimalista de código abierto, donde el servidor no tiene ningún conocimiento de los datos guardados. Los datos son cifrados/descifrados %sen el navegador%s usando 256 bits AES.", "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.": "%s es un \"pastebin\" en línea minimalista de código abierto, donde el servidor no tiene ningún conocimiento de los datos guardados. Los datos son cifrados/descifrados %sen el navegador%s usando 256 bits AES.",
"More information on the <a href=\"https://privatebin.info/\">project page</a>.": "Más información en la <a href=\"https://privatebin.info/\">página del proyecto</a>.", "More information on the <a href=\"https://privatebin.info/\">project page</a>.": "Más información en la <a href=\"https://privatebin.info/\">página del proyecto</a>.",
"Because ignorance is bliss": "Porque la ignorancia es dicha", "Because ignorance is bliss": "Porque la ignorancia es felicidad",
"en": "es", "en": "es",
"Paste does not exist, has expired or has been deleted.": "El \"paste\" no existe, ha caducado o ha sido eliminado.", "Paste does not exist, has expired or has been deleted.": "El \"paste\" no existe, ha caducado o ha sido eliminado.",
"%s requires php %s or above to work. Sorry.": "%s requiere php %s o superior para funcionar. Lo siento.", "%s requires php %s or above to work. Sorry.": "%s requiere php %s o superior para funcionar. Lo siento.",
@ -186,5 +186,5 @@
"Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visite este enlace para ver la nota. Dar la URL a cualquier persona también les permite acceder a la nota.", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visite este enlace para ver la nota. Dar la URL a cualquier persona también les permite acceder a la nota.",
"URL shortener may expose your decrypt key in URL.": "El acortador de URL puede exponer su clave de descifrado en el URL.", "URL shortener may expose your decrypt key in URL.": "El acortador de URL puede exponer su clave de descifrado en el URL.",
"Save paste": "Guardar \"paste\"", "Save paste": "Guardar \"paste\"",
"Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." "Your IP is not authorized to create pastes.": "Tu IP no está autorizada para crear contenido."
} }

View File

@ -186,5 +186,5 @@
"Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Norėdami matyti užrašus, aplankykite šį tinklalapį. Pasidalinus šiuo URL adresu su kitais žmonėmis, jiems taip pat bus leidžiama prieiga prie šių užrašų.", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Norėdami matyti užrašus, aplankykite šį tinklalapį. Pasidalinus šiuo URL adresu su kitais žmonėmis, jiems taip pat bus leidžiama prieiga prie šių užrašų.",
"URL shortener may expose your decrypt key in URL.": "URL trumpinimo įrankis gali atskleisti URL adrese jūsų iššifravimo raktą.", "URL shortener may expose your decrypt key in URL.": "URL trumpinimo įrankis gali atskleisti URL adrese jūsų iššifravimo raktą.",
"Save paste": "Įrašyti įdėjimą", "Save paste": "Įrašyti įdėjimą",
"Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." "Your IP is not authorized to create pastes.": "Jūsų IP adresas neturi įgaliojimų kurti įdėjimų."
} }

1785
js/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -837,8 +837,10 @@ class Database extends AbstractData
end;' end;'
); );
} else { } else {
// CREATE INDEX IF NOT EXISTS not supported as of Oracle MySQL <= 8.0
self::$_db->exec( self::$_db->exec(
'CREATE INDEX IF NOT EXISTS "comment_parent" ON "' . 'CREATE INDEX "' .
self::_sanitizeIdentifier('comment_parent') . '" ON "' .
self::_sanitizeIdentifier('comment') . '" ("pasteid")' self::_sanitizeIdentifier('comment') . '" ("pasteid")'
); );
} }
@ -941,16 +943,20 @@ class Database extends AbstractData
); );
} else { } else {
self::$_db->exec( self::$_db->exec(
'CREATE UNIQUE INDEX IF NOT EXISTS "paste_dataid" ON "' . 'CREATE UNIQUE INDEX IF NOT EXISTS "' .
self::_sanitizeIdentifier('paste_dataid') . '" ON "' .
self::_sanitizeIdentifier('paste') . '" ("dataid")' self::_sanitizeIdentifier('paste') . '" ("dataid")'
); );
self::$_db->exec( self::$_db->exec(
'CREATE UNIQUE INDEX IF NOT EXISTS "comment_dataid" ON "' . 'CREATE UNIQUE INDEX IF NOT EXISTS "' .
self::_sanitizeIdentifier('comment_dataid') . '" ON "' .
self::_sanitizeIdentifier('comment') . '" ("dataid")' self::_sanitizeIdentifier('comment') . '" ("dataid")'
); );
} }
// CREATE INDEX IF NOT EXISTS not supported as of Oracle MySQL <= 8.0
self::$_db->exec( self::$_db->exec(
'CREATE INDEX IF NOT EXISTS "comment_parent" ON "' . 'CREATE INDEX "' .
self::_sanitizeIdentifier('comment_parent') . '" ON "' .
self::_sanitizeIdentifier('comment') . '" ("pasteid")' self::_sanitizeIdentifier('comment') . '" ("pasteid")'
); );
// no break, continue with updates for 0.22 and later // no break, continue with updates for 0.22 and later