mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-11-27 09:40:34 -05:00
Merge branch 'master' into eslint
This commit is contained in:
commit
851befb39d
47 changed files with 197 additions and 34 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -23,7 +23,6 @@ js/test/ export-ignore
|
|||
.styleci.yml export-ignore
|
||||
.travis.yml export-ignore
|
||||
.vscode export-ignore
|
||||
codacy-analysis.yml export-ignore
|
||||
crowdin.yml export-ignore
|
||||
BADGES.md export-ignore
|
||||
CODE_OF_CONDUCT.md export-ignore
|
||||
|
|
|
|||
|
|
@ -24,26 +24,30 @@ jobs:
|
|||
steps:
|
||||
# Checkout the repository to the GitHub Actions runner
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Remove folders causing errors in report
|
||||
run: rm -rf doc img *.md
|
||||
|
||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||
- name: Run Codacy Analysis CLI
|
||||
uses: codacy/codacy-analysis-cli-action@1.1.0
|
||||
uses: codacy/codacy-analysis-cli-action@v4
|
||||
with:
|
||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
||||
# You can also omit the token and run the tools that support default configurations
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
verbose: true
|
||||
output: results.sarif
|
||||
format: sarif
|
||||
# verbose: true
|
||||
# output: results.sarif
|
||||
# format: sarif
|
||||
# Adjust severity of non-security issues
|
||||
gh-code-scanning-compat: true
|
||||
# gh-code-scanning-compat: true
|
||||
# Force 0 exit code to allow SARIF file generation
|
||||
# This will handover control about PR rejection to the GitHub side
|
||||
max-allowed-issues: 2147483647
|
||||
# max-allowed-issues: 2147483647
|
||||
|
||||
# Upload the SARIF file generated in the previous step
|
||||
- name: Upload SARIF results file
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
# disabled due to: https://github.com/codacy/codacy-analysis-cli-action/issues/142
|
||||
#- name: Upload SARIF results file
|
||||
# uses: github/codeql-action/upload-sarif@v4
|
||||
# with:
|
||||
# sarif_file: results.sarif
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -26,8 +26,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
language: [ 'actions', 'javascript' ]
|
||||
# CodeQL supports [ 'actions', 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# 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
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v4
|
||||
|
|
|
|||
2
.github/workflows/snyk-scan.yml
vendored
2
.github/workflows/snyk-scan.yml
vendored
|
|
@ -30,6 +30,6 @@ jobs:
|
|||
with:
|
||||
args: --sarif-file-output=snyk.sarif
|
||||
- name: Upload result to GitHub Code Scanning
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
with:
|
||||
sarif_file: snyk.sarif
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
# Badges
|
||||
|
||||
[](https://travis-ci.org/PrivateBin/PrivateBin) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/build-status/master)
|
||||
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
||||
[](https://codeclimate.com/github/PrivateBin/PrivateBin)
|
||||
[](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/build-status/master) [](https://codeclimate.com/github/PrivateBin/PrivateBin)
|
||||
[](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
||||
[](https://insight.sensiolabs.com/projects/57c9e74e-c6f9-4de6-a876-df66ec2ea1ff)
|
||||
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
||||
[](https://codeclimate.com/github/PrivateBin/PrivateBin/coverage) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
||||
[](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
||||
|
||||
[](https://www.browserstack.com/)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
# PrivateBin version history
|
||||
|
||||
## 2.0.1 (not yet released)
|
||||
* ADDED: Auto shorten URLs with config option `shortenbydefault` (#1627)
|
||||
* ADDED: Added `shortenviashlink` endpoint with an `shlink` configuration section
|
||||
* ADDED: Password peek (#1254)
|
||||
* CHANGED: CSP recommendation around bootstrap5 template resolved in Firefox 131 (#1613)
|
||||
* FIXED: Allow pasting a password for decrypting a paste (#1620)
|
||||
* FIXED: Allow copying the shortened link after using a URL shortener (#1624)
|
||||
* ADDED: Auto shorten URLs with config option `shortenbydefault` (#1627)
|
||||
* ADDED: Added `shortenviashlink` endpoint with an `shlink` configuration section
|
||||
* FIXED: Check for quotes and conical braces when extracting short url (#1644)
|
||||
* FIXED: URL extraction fails when frame-ancestors is set in CSP (#1644)
|
||||
|
||||
## 2.0.0 (2025-07-28)
|
||||
* ADDED: Error logging in database and filesystem backend (#1554)
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "نُسخ الرابط إلى الحافظة",
|
||||
"Document text": "لصق النص",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "مفتاح التبويب يعمل كشخصية (انقر <kbd>Ctrl</kbd>+<kbd>m</kbd> أو <kbd>Esc</kbd> للتبديل)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "السمة"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "U liame hè statu cupiatu in u preme’papei",
|
||||
"Document text": "Testu di u ducumentu",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "U tastu di tabulazione ghjova cum’è un caratteru (Appughjate nant’à <kbd>Ctrl</kbd>+<kbd>m</kbd> o <kbd>Scapp</kbd> per scambià)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Tema"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Odkaz zkopírován do schránky",
|
||||
"Document text": "Text dokumentu",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulátor funguje jako znak (pro přepnutí stiskněte <kbd>Ctrl</kbd>+<kbd>m</kbd> nebo <kbd>Esc</kbd>)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Vzhled"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Verknüpfung wurde in die Zwischenablage kopiert.",
|
||||
"Document text": "Text des Dokuments",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulatortaste als Zeichen interpretieren (Umschalten durch <kbd>Strg</kbd>+<kbd>m</kbd> oder <kbd>Esc</kbd>)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Design"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Enlace copiado al portapapeles",
|
||||
"Document text": "Texto del documento",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "La tecla de tabulación funciona como carácter (presione <kbd>Ctrl</kbd>+<kbd>m</kbd> o <kbd>Esc</kbd> para alternar)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Tema"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link kopeeriti lõikelauale",
|
||||
"Document text": "Kleebi tekst",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Teema"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Linkki kopioitu leikepöydälle",
|
||||
"Document text": "Liitä teksti",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulaattori toimii merkkinä (Paina <kbd>Ctrl</kbd>+<kbd>m</kbd> tai <kbd>Esc</kbd> vaihtaaksesi)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Teema"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Lien copié dans le presse-papier",
|
||||
"Document text": "Texte du document",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "La touche de tabulation sert de caractère (Presser <kbd>Ctrl</kbd>+<kbd>m</kbd> ou <kbd>Esc</kbd> pour basculer)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Thème"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "הקישור הועתק ללוח",
|
||||
"Document text": "הדבק טקסט",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "משטח ה-tab פועל כמקש תו (לחץ על <kbd>Ctrl</kbd>+<kbd>m</kbd> או <kbd>Esc</kbd> להחלפה)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "נושא"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Testo del messaggio",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link gekopieerd naar klembord",
|
||||
"Document text": "Tekst plakken",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulatortoets dient als teken (gebruik <kbd>Ctrl</kbd>+<kbd>m</kbd> of <kbd>Esc</kbd> om te schakelen)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Thema"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link skopiowany do schowka",
|
||||
"Document text": "Treść dokumentu",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Klawisz Tabulatora służy jako znak (użyj <kbd>Ctrl</kbd>+<kbd>m</kbd> lub <kbd>Esc</kbd>, aby przełączyć tryb)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Motyw"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Ссылка скопирована в буфер обмена",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Тема"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Odkaz vložený do schránky",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "คัดลอกลิงก์ไปที่คลิปบอร์ดแล้ว",
|
||||
"Document text": "ฝากข้อความ",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "ปุ่ม Tabulator ใช้เป็นอักขระ (กด <kbd>Ctrl</kbd>+<kbd>m</kbd> หรือ <kbd>Esc</kbd> เพื่อสลับ)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "ธีม"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "Link copied to clipboard",
|
||||
"Document text": "Document text",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "Theme"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,5 +229,7 @@
|
|||
"Link copied to clipboard": "链接已复制到剪贴板",
|
||||
"Document text": "粘贴文本",
|
||||
"Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)": "Tab 键可作为字符(按 <kbd>Ctrl</kbd>+<kbd>m</kbd> 或 <kbd>Esc</kbd> 切换开关)",
|
||||
"Show password": "Show password",
|
||||
"Hide password": "Hide password",
|
||||
"Theme": "主题"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 11 KiB |
|
|
@ -5675,6 +5675,73 @@ jQuery.PrivateBin = (function($) {
|
|||
return me;
|
||||
})();
|
||||
|
||||
/**
|
||||
*
|
||||
* @name PasswordPeek
|
||||
* @class
|
||||
*/
|
||||
const PasswordPeek = (function () {
|
||||
const me = {};
|
||||
|
||||
/**
|
||||
* Switch between visible and hidden password
|
||||
*
|
||||
* @name PasswordPeek.handleRevealButtonClick
|
||||
* @private
|
||||
* @function
|
||||
*/
|
||||
function handleRevealButtonClick() {
|
||||
const element = $(this);
|
||||
const passwordInput = element.siblings('.input-password');
|
||||
const isHidden = passwordInput.attr('type') === 'password';
|
||||
|
||||
passwordInput.attr('type', isHidden ? 'text' : 'password');
|
||||
|
||||
const tooltip = I18n._(isHidden ? 'Hide password' : 'Show password');
|
||||
|
||||
element.attr('title', tooltip);
|
||||
element.attr('aria-label', tooltip);
|
||||
|
||||
// handle bootstrap 5 icons: eye & eye-slash
|
||||
const buttonSvg = element.find('use');
|
||||
if (buttonSvg.length) {
|
||||
const iconHref = buttonSvg.attr('href');
|
||||
if (isHidden) {
|
||||
buttonSvg.attr('href', iconHref + '-slash');
|
||||
} else {
|
||||
buttonSvg.attr('href', iconHref.substring(0, iconHref.length - 6));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// handle bootstrap 3 icons: eye-open & eye-close
|
||||
const buttonSpan = element.find('span');
|
||||
if (buttonSpan.length) {
|
||||
if (isHidden) {
|
||||
buttonSpan.addClass('glyphicon-eye-close');
|
||||
buttonSpan.removeClass('glyphicon-eye-open');
|
||||
} else {
|
||||
buttonSpan.addClass('glyphicon-eye-open');
|
||||
buttonSpan.removeClass('glyphicon-eye-close');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize
|
||||
*
|
||||
* @name PasswordPeek.init
|
||||
* @function
|
||||
*/
|
||||
me.init = function() {
|
||||
const revealButton = $('.toggle-password');
|
||||
|
||||
revealButton.click(handleRevealButtonClick);
|
||||
};
|
||||
|
||||
return me;
|
||||
})();
|
||||
|
||||
/**
|
||||
* (controller) main PrivateBin logic
|
||||
*
|
||||
|
|
@ -5923,6 +5990,7 @@ jQuery.PrivateBin = (function($) {
|
|||
TopNav.init();
|
||||
UiHelper.init();
|
||||
CopyToClipboard.init();
|
||||
PasswordPeek.init();
|
||||
|
||||
// check for legacy browsers before going any further
|
||||
if (!Legacy.Check.getInit()) {
|
||||
|
|
@ -5982,6 +6050,7 @@ jQuery.PrivateBin = (function($) {
|
|||
ServerInteraction: ServerInteraction,
|
||||
PasteEncrypter: PasteEncrypter,
|
||||
PasteDecrypter: PasteDecrypter,
|
||||
PasswordPeek: PasswordPeek,
|
||||
CopyToClipboard: CopyToClipboard,
|
||||
Controller: Controller
|
||||
};
|
||||
|
|
|
|||
|
|
@ -109,7 +109,12 @@ if (count($class)) {
|
|||
<form id="passwordform" role="form">
|
||||
<div class="form-group">
|
||||
<label for="passworddecrypt"><span class="glyphicon glyphicon-eye-open"></span> <?php echo I18n::_('Please enter the password for this document:') ?></label>
|
||||
<input id="passworddecrypt" type="password" class="form-control" placeholder="<?php echo I18n::_('Enter password') ?>" required="required">
|
||||
<div class="input-group">
|
||||
<input id="passworddecrypt" type="password" class="form-control input-password" placeholder="<?php echo I18n::_('Enter password') ?>" required="required">
|
||||
<div class="input-group-addon toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success btn-block"><span class="glyphicon glyphicon-off"></span> <?php echo I18n::_('Decrypt') ?></button>
|
||||
</form>
|
||||
|
|
@ -368,7 +373,12 @@ if ($PASSWORD) :
|
|||
?>
|
||||
<li>
|
||||
<div id="password" class="navbar-form hidden">
|
||||
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="23" />
|
||||
<div class="password-peek-container">
|
||||
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control input-password" size="23" />
|
||||
<div class="input-group-addon toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -82,7 +82,12 @@ endif;
|
|||
<form id="passwordform" role="form">
|
||||
<div class="mb-3">
|
||||
<label for="passworddecrypt"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg> <?php echo I18n::_('Please enter the password for this document:') ?></label>
|
||||
<input id="passworddecrypt" type="password" class="form-control" placeholder="<?php echo I18n::_('Enter password') ?>" required="required" />
|
||||
<div class="input-group">
|
||||
<input id="passworddecrypt" type="password" class="form-control input-password" placeholder="<?php echo I18n::_('Enter password') ?>" required="required" />
|
||||
<button class="btn btn-outline-secondary toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
|
||||
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success btn-block"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#power" /></svg> <?php echo I18n::_('Decrypt') ?></button>
|
||||
</form>
|
||||
|
|
@ -243,7 +248,12 @@ if ($PASSWORD) :
|
|||
?>
|
||||
<li class="nav-item">
|
||||
<div id="password" class="navbar-form hidden">
|
||||
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" aria-label="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="23" />
|
||||
<div class="input-group">
|
||||
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" aria-label="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control input-password" size="23" />
|
||||
<button class="btn btn-outline-secondary toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
|
||||
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue