* [pve-devel] [PATCH access-control] tfa: fix http 404 in get_tfa_entry
@ 2021-11-12 9:37 Wolfgang Bumiller
2021-11-12 10:02 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Bumiller @ 2021-11-12 9:37 UTC (permalink / raw)
To: pve-devel
this produced warnings in the journal and returned code 500
instead
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
src/PVE/API2/TFA.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/TFA.pm b/src/PVE/API2/TFA.pm
index 87d7255..657a74c 100644
--- a/src/PVE/API2/TFA.pm
+++ b/src/PVE/API2/TFA.pm
@@ -3,6 +3,8 @@ package PVE::API2::TFA;
use strict;
use warnings;
+use HTTP::Status qw(:constants);
+
use PVE::AccessControl;
use PVE::Cluster qw(cfs_read_file cfs_write_file);
use PVE::JSONSchema qw(get_standard_option);
@@ -280,7 +282,7 @@ __PACKAGE__->register_method ({
my $tfa_cfg = cfs_read_file('priv/tfa.cfg');
my $id = $param->{id};
my $entry = $tfa_cfg->api_get_tfa_entry($param->{userid}, $id);
- raise("No such tfa entry '$id'", 404) if !$entry;
+ raise("No such tfa entry '$id'", code => HTTP::Status::HTTP_NOT_FOUND) if !$entry;
return $entry;
}});
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH access-control] tfa: fix http 404 in get_tfa_entry
2021-11-12 9:37 [pve-devel] [PATCH access-control] tfa: fix http 404 in get_tfa_entry Wolfgang Bumiller
@ 2021-11-12 10:02 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-12 10:02 UTC (permalink / raw)
To: Proxmox VE development discussion, Wolfgang Bumiller
On 12.11.21 10:37, Wolfgang Bumiller wrote:
> this produced warnings in the journal and returned code 500
> instead
>
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
> src/PVE/API2/TFA.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-12 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 9:37 [pve-devel] [PATCH access-control] tfa: fix http 404 in get_tfa_entry Wolfgang Bumiller
2021-11-12 10:02 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox