Verified Commit be426c5d authored by Dustin Gawron's avatar Dustin Gawron
Browse files

Abhängigkeiten + Lizenz aktualisiert; kleiner Fix für PW-Karte

parent 1ab63196
# MIT License
# GNU Affero General Public License
- Copyright (c) 2017-2018 Westfälische Wilhelms-Universität Münster
ZIV Passwort-Tools
Copyright (c) 2017-2020 Westfälische Wilhelms-Universität Münster
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
This program 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 Affero General Public License for more details.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
......@@ -7,10 +7,14 @@ Die ZIV Passwort-Tools sind eine Webanwendung, die einen Passworgenerator für z
## Abhängigkeiten
* [pwgen](https://linux.die.net/man/1/pwgen)
* [TCPDF](https://tcpdf.org/)
* [jQuery](https://jquery.com/)
* [jQuery UI](https://jqueryui.com/)
* [pwgen](https://linux.die.net/man/1/pwgen) (Muss auf dem Webserver vorhanden sein!)
* [TCPDF](https://tcpdf.org/) (Enthalten)
* [jQuery](https://jquery.com/) (Enthalten)
* [jQuery UI](https://jqueryui.com/) (Enthalten)
## Installation
Den gesamten Ordnerinhalt in das gewünschte Verzeichnis auf dem Webserver kopieren und den Pfad für das pwgen-Programm in der Datei [index.php](index.php) anpassen (die entsprechende Variable ist `$pwgen_path`).
## Notiz zum Passwortcheck
......@@ -18,10 +22,11 @@ Der Passwortcheck basiert auf dem [Password Strength Checker](http://www.passwor
## History
* 2020-01-19 - Update der Lizenz und der Abhängigkeiten
* 2017-09-22 - Erste Version
## Lizenz
Copyright 2017-2018 Westfälische Wilhelms-Universität Münster (https://www.uni-muenster.de)
Copyright 2017-2020 [Westfälische Wilhelms-Universität Münster](https://www.uni-muenster.de)
Licensed under MIT (https://opensource.org/licenses/MIT)
Licensed under [AGPL-3.0-or-later](https://www.gnu.org/licenses/agpl.html)
/*
* ZIV Passwort-Generator
*
* Stil-Datei
*
* Autor: Dustin Gawron <dustin.gawron@uni-muenster.de>
*
* (c) 2017-2020 Westfälische Wilhelms-Universität Münster
*/
/* Allgemein */
.error {
margin: auto;
......
......@@ -6,7 +6,7 @@
*
* Autor: Dustin Gawron <dustin.gawron@uni-muenster.de>
*
* (c) 2017 Westfälische Wilhelms-Universität Münster
* (c) 2017-2020 Westfälische Wilhelms-Universität Münster
*/
# Texte
......@@ -158,7 +158,7 @@ if($pwcard_return === 0) {
<link rel="stylesheet" href="css/jquery-ui.min.css">
<link rel="stylesheet" href="css/jquery-ui.theme.min.css">
<link rel="stylesheet" href="css/zivpwtools.css">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/pwdmeter_min.js"></script>
<script type="text/javascript" src="js/zivpwtools.js"></script>
......@@ -247,7 +247,11 @@ if($pwcard_return === 0) {
<?php
if($pwcard_return === 0) {
?>
<p style="text-align: center;"><a style="text-decoration: none;" href="makePDF.php?lang=<?= $lang ?>&data=<?= urlencode(json_encode($pwcard_result)) ?>" target="_blank"><input class="ui-button" type="button" value="<?= $strings[$lang]['pwcard_link'] ?>"></a></p>
<form action="makePDF.php" method="post" target="_blank">
<input type="hidden" name="lang" value="<?= $lang ?>">
<input type="hidden" name="data" value="<?= urlencode(json_encode($pwcard_result)) ?>">
<p style="text-align: center;"><input class="ui-button" type="submit" value="<?= $strings[$lang]['pwcard_link'] ?>"></p>
</form>
<form action="index.php" method="get">
<input type="hidden" name="mode" value="pwcard">
<input type="hidden" name="lang" value="<?= $lang ?>">
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@
*
* Autor: Dustin Gawron <dustin.gawron@uni-muenster.de>
*
* (c) 2017 Westfälische Wilhelms-Universität Münster
* (c) 2017-2020 Westfälische Wilhelms-Universität Münster
*/
function showScore(fieldId, score, pwLength) {
......
......@@ -6,7 +6,7 @@
*
* Autor: Dustin Gawron <dustin.gawron@uni-muenster.de>
*
* (c) 2017 Westfälische Wilhelms-Universität Münster
* (c) 2017-2020 Westfälische Wilhelms-Universität Münster
*/
require_once 'tcpdf/tcpdf.php';
......@@ -28,7 +28,7 @@ $strings = array(
);
# Nutzervariablen erhalten
$pwcard = isset($_REQUEST['data']) ? json_decode($_REQUEST['data']) : false;
$pwcard = isset($_REQUEST['data']) ? json_decode(urldecode($_REQUEST['data'])) : false;
if(!$pwcard) {
http_response_code(404);
......@@ -93,7 +93,7 @@ $html.= $pwcard_big.$pwcard_big;
$html.= <<<EOD
<table>
<tr>
<td style="width: 48%">
<table style="border: 1px solid black; border-collapse: collapse; font-family: monospace; font-size: 0.9em; text-align: center;">
<tr><th style="border: 1px solid black"></th><th style="border: 1px solid black"><b>ABC</b></th style="border: 1px solid black"><th style="border: 1px solid black"><b>DEF</b></th><th style="border: 1px solid black"><b>GHI</b></th><th style="border: 1px solid black"><b>JKL</b></th><th style="border: 1px solid black"><b>MNO</b></th><th style="border: 1px solid black"><b>PQR</b></th><th style="border: 1px solid black"><b>STU</b></th><th style="border: 1px solid black"><b>VWX</b></th><th style="border: 1px solid black"><b>YZ</b></th><th style="border: 1px solid black"><b>.</b></th></tr>
......@@ -135,7 +135,7 @@ $html.= <<<EOD
</tr>
</table>
</td>
</tr>
</table>
EOD;
......@@ -144,4 +144,4 @@ $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, 'C', true);
# PDF erzeugen und als herunterladbare Datei zurückgeben ('D' Download, 'I' Direkte Anzeige im Browser)
$pdf->Output($strings[$lang]['filename'], 'D');
?>
\ No newline at end of file
?>
6.2.25
- Fix support for image URLs.
6.2.24
- Support remote urls when checking if file exists.
6.2.23
- Simplify file_exists function.
6.2.22
- Fix for security vulnerability: Using the phar:// wrapper it was possible to trigger the unserialization of user provided data.
6.2.19
- Merge various fixes for PHP 7.3 compatibility and security.
6.2.13 (2016-06-10)
- IMPORTANT: A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this version will not receive any additional development or support. This version should be considered obsolete, new projects should use the new version as soon it will become stable.
......
......@@ -6,6 +6,8 @@
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
2002-2019 Nicola Asuni - Tecnick.com LTD
**********************************************************************
**********************************************************************
......
......@@ -6,7 +6,7 @@
* **category** Library
* **author** Nicola Asuni <info@tecnick.com>
* **copyright** 2002-2016 Nicola Asuni - Tecnick.com LTD
* **copyright** 2002-2020 Nicola Asuni - Tecnick.com LTD
* **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
* **link** http://www.tcpdf.org
* **source** https://github.com/tecnickcom/TCPDF
......
{
"name": "tecnickcom/tcpdf",
"version": "6.2.13",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"],
"license": "LGPLv3",
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"classmap": [
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
}
"name": "tecnickcom/tcpdf",
"version": "6.3.5",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"keywords": [
"PDF",
"tcpdf",
"PDFD32000-2008",
"qrcode",
"datamatrix",
"pdf417",
"barcodes"
],
"license": "LGPL-3.0-only",
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"role": "lead"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"classmap": [
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -629,7 +629,7 @@ class Datamatrix {
if ($numch[ENC_C40] == $numch[ENC_X12]) {
$k = ($pos + $charscount + 1);
while ($k < $data_length) {
$tmpchr = ord($data{$k});
$tmpchr = ord($data[$k]);
if ($this->isCharMode($tmpchr, ENC_X12)) {
return ENC_X12;
} elseif (!($this->isCharMode($tmpchr, ENC_X12) OR $this->isCharMode($tmpchr, ENC_C40))) {
......
......@@ -740,16 +740,6 @@ class PDF417 {
* @protected
*/
protected function getErrorCorrectionLevel($ecl, $numcw) {
// get maximum correction level
$maxecl = 8; // starting error level
$maxerrsize = (928 - $numcw); // available codewords for error
while ($maxecl > 0) {
$errsize = (2 << $ecl);
if ($maxerrsize >= $errsize) {
break;
}
--$maxecl;
}
// check for automatic levels
if (($ecl < 0) OR ($ecl > 8)) {
if ($numcw < 41) {
......@@ -764,6 +754,16 @@ class PDF417 {
$ecl = $maxecl;
}
}
// get maximum correction level
$maxecl = 8; // starting error level
$maxerrsize = (928 - $numcw); // available codewords for error
while ($maxecl > 0) {
$errsize = (2 << $ecl);
if ($maxerrsize >= $errsize) {
break;
}
--$maxecl;
}
if ($ecl > $maxecl) {
$ecl = $maxecl;
}
......@@ -878,7 +878,7 @@ class PDF417 {
$txtarr = array(); // array of characters and sub-mode switching characters
$codelen = strlen($code);
for ($i = 0; $i < $codelen; ++$i) {
$chval = ord($code{$i});
$chval = ord($code[$i]);
if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) {
// we are on the same sub-mode
$txtarr[] = $k;
......@@ -888,7 +888,7 @@ class PDF417 {
// search new sub-mode
if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) {
// $s is the new submode
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
// shift (temporary change only for this char)
if ($s == 3) {
// shift to puntuaction
......@@ -952,7 +952,7 @@ class PDF417 {
$cw = array_merge($cw, $cw6);
} else {
for ($i = 0; $i < $sublen; ++$i) {
$cw[] = ord($code{$i});
$cw[] = ord($code[$i]);
}
}
$code = $rest;
......
No preview for this file type
......@@ -358,7 +358,7 @@ class TCPDF_COLORS {
$color_code = self::$webcolor[$color];
} else {
// spot color
$returncolor = self::getSpotColor($color, $spotc);
$returncolor = self::getSpotColor($hcolor, $spotc);
if ($returncolor === false) {
$returncolor = $defcol;
}
......
......@@ -279,7 +279,7 @@ class TCPDF_FILTERS {
// convert string to binary string
$bitstring = '';
for ($i = 0; $i < $data_length; ++$i) {
$bitstring .= sprintf('%08b', ord($data{$i}));
$bitstring .= sprintf('%08b', ord($data[$i]));
}
// get the number of bits
$data_length = strlen($bitstring);
......@@ -376,7 +376,7 @@ class TCPDF_FILTERS {
$i = 0;
while($i < $data_length) {
// get current byte value
$byte = ord($data{$i});
$byte = ord($data[$i]);
if ($byte == 128) {
// a length value of 128 denote EOD
break;
......@@ -389,7 +389,7 @@ class TCPDF_FILTERS {
} else {
// if length is in the range 129 to 255,
// the following single byte shall be copied 257 - length (2 to 128) times during decompression
$decoded .= str_repeat($data{($i + 1)}, (257 - $byte));
$decoded .= str_repeat($data[($i + 1)], (257 - $byte));
// move to next block
$i += 2;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment