]> git.proxmox.com Git - pve-apiclient.git/log
pve-apiclient.git
6 years agobump version to 2.0-4
Wolfgang Bumiller [Mon, 22 Jan 2018 14:15:09 +0000 (15:15 +0100)]
bump version to 2.0-4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoavoid harmful '<>' pattern, explicitly read from STDIN
Thomas Lamprecht [Mon, 22 Jan 2018 09:52:13 +0000 (10:52 +0100)]
avoid harmful '<>' pattern, explicitly read from STDIN

Fixes problems in CLIHandler using the code pattern:

while (my $line = <>) {
    ...
}

For why this causes only _now_ problems lets first look how <>
behaves:

"The null filehandle <> is special: [...] Input from <> comes either
from standard input, or from each file listed on the command line.
Here's how it works: the first time <> is evaluated, the @ARGV array
is checked, and if it is empty, $ARGV[0] is set to "-" , which when
opened gives you standard input.  The @ARGV array is then processed
as a list of filenames." - 'perldoc perlop'

Recent changes in the CLIHandler code changed how we modfiied @ARGV
Earlier we assumed that the first argument must be the command and
thus shifted it out of @ARGV, now we can have multiple levels of
(sub)commands. This change also changed how we handle @ARGV, we do
not unshift anything but go through the arguments until we got to
the final command and copy the rest of @ARGV as we know that this
must be the commandos arguments.

For '<>' this means that ARGV was still fully populated and perl
tried to open element as a file, which naturally failed.
Thus the change in pve-common only exposed this 'dangerous' code
pattern.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 2.0-3
Fabian Grünbichler [Wed, 17 Jan 2018 13:17:10 +0000 (14:17 +0100)]
bump version to 2.0-3

6 years agoraise exception if manual fingerprint verification failed
Thomas Lamprecht [Thu, 14 Dec 2017 10:12:06 +0000 (11:12 +0100)]
raise exception if manual fingerprint verification failed

If a fingerprint could not be verified automatically or manually
raise an exception to ensure that we do not continue with handling
the problematic or even evil response.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agouse new Exception.pm class to signal errors to caller
Thomas Lamprecht [Thu, 14 Dec 2017 10:12:05 +0000 (11:12 +0100)]
use new Exception.pm class to signal errors to caller

Allows a caller to acces the HTTP response code, which may be useful
to handle application logic. E.g., catching a HTTP_NOT_IMPLEMENTED
and fallback to an older method.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoadd APIClient/Exception.pm class
Thomas Lamprecht [Thu, 14 Dec 2017 10:12:04 +0000 (11:12 +0100)]
add APIClient/Exception.pm class

As we do not want to depend on PVE libraries with this I forked of
the PVE::Exception class, removed all raise_* methods so that only
raise() itself was left over.

Also some minor adaptions to newer style for exporting where used.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobuildsys: also cleanup *.buildinfo files
Thomas Lamprecht [Thu, 14 Dec 2017 10:38:17 +0000 (11:38 +0100)]
buildsys: also cleanup *.buildinfo files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoadd missing if
Fabian Grünbichler [Tue, 12 Dec 2017 10:02:48 +0000 (11:02 +0100)]
add missing if

6 years agocleanup Net::SSLeay error handling
Fabian Grünbichler [Mon, 27 Nov 2017 09:18:48 +0000 (10:18 +0100)]
cleanup Net::SSLeay error handling

X509_get_fingerprint does not die - it only returns undef in case of
errors (or segfaults if the $cert pointer is invalid).

6 years agobuild: reformat debian/control
Fabian Grünbichler [Wed, 4 Oct 2017 09:05:33 +0000 (11:05 +0200)]
build: reformat debian/control

using wrap-and-sort -abt

7 years agobump version to 2.0-2
Dietmar Maurer [Thu, 6 Apr 2017 09:04:48 +0000 (11:04 +0200)]
bump version to 2.0-2

7 years agoallow to specify cookie_name
Dietmar Maurer [Thu, 6 Apr 2017 09:03:41 +0000 (11:03 +0200)]
allow to specify cookie_name

7 years agobump version tp 2.0-1 for debain stretch
Dietmar Maurer [Fri, 10 Mar 2017 08:07:50 +0000 (09:07 +0100)]
bump version tp 2.0-1 for debain stretch

Makefile: use "--product pmg,pve --dist stretch" for upload target

7 years agoperftest1.pl: another example
Dietmar Maurer [Wed, 28 Dec 2016 10:35:30 +0000 (11:35 +0100)]
perftest1.pl: another example

7 years agoexample2.pl: add a second example
Dietmar Maurer [Wed, 28 Dec 2016 10:04:37 +0000 (11:04 +0100)]
example2.pl: add a second example

7 years agoexample1.pl: remove unnecessary perfix /api2/json/
Dietmar Maurer [Wed, 28 Dec 2016 09:52:09 +0000 (10:52 +0100)]
example1.pl: remove unnecessary perfix /api2/json/

7 years agoexample1.pl: use warnings instead of -w flag
Dietmar Maurer [Wed, 28 Dec 2016 09:49:20 +0000 (10:49 +0100)]
example1.pl: use warnings instead of -w flag

7 years agoadd simple example code, bump version to 1.0-2
Dietmar Maurer [Wed, 28 Dec 2016 09:47:23 +0000 (10:47 +0100)]
add simple example code, bump version to 1.0-2

7 years agoadd missing dependencies
Dietmar Maurer [Fri, 16 Dec 2016 08:34:14 +0000 (09:34 +0100)]
add missing dependencies

7 years agoadd dintsall target
Dietmar Maurer [Fri, 16 Dec 2016 08:23:14 +0000 (09:23 +0100)]
add dintsall target

7 years agoadd Makefile and debian package files
Dietmar Maurer [Fri, 16 Dec 2016 08:21:41 +0000 (09:21 +0100)]
add Makefile and debian package files

7 years agoinitial import
Dietmar Maurer [Fri, 16 Dec 2016 07:52:37 +0000 (08:52 +0100)]
initial import

copied from pve-gui-tests