* [pmg-devel] [PATCH pmg-api] restenv: pass arguments to check_node_is_master
@ 2025-02-27 13:45 Stoiko Ivanov
2025-02-27 13:59 ` [pmg-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2025-02-27 13:45 UTC (permalink / raw)
To: pmg-devel
Mira noticed this while testing logging in to a secondary node with
OIDC and autocreate.
as check_node_is_master is only used in one other place (without
$noerr) I assume this simply never got noticed.
Reported-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/RESTEnvironment.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/RESTEnvironment.pm b/src/PMG/RESTEnvironment.pm
index f6ff449..0ccacb2 100644
--- a/src/PMG/RESTEnvironment.pm
+++ b/src/PMG/RESTEnvironment.pm
@@ -103,7 +103,7 @@ sub check_user_exist {
}
sub check_node_is_master {
- my ($self, $noerr);
+ my ($self, $noerr) = @_;
my $master = PMG::Cluster::get_master_node($self->{cinfo});
--
2.39.5
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pmg-devel] applied: [PATCH pmg-api] restenv: pass arguments to check_node_is_master
2025-02-27 13:45 [pmg-devel] [PATCH pmg-api] restenv: pass arguments to check_node_is_master Stoiko Ivanov
@ 2025-02-27 13:59 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-02-27 13:59 UTC (permalink / raw)
To: Stoiko Ivanov, pmg-devel
Am 27.02.25 um 14:45 schrieb Stoiko Ivanov:
> Mira noticed this while testing logging in to a secondary node with
> OIDC and autocreate.
>
> as check_node_is_master is only used in one other place (without
> $noerr) I assume this simply never got noticed.
>
> Reported-by: Mira Limbeck <m.limbeck@proxmox.com>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> src/PMG/RESTEnvironment.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
reworded subject to "query arguments in check_node_is_master",
as the problem wasn't that call-sites forgot to pass the argument
but that the method did not look (queried) at them.
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-27 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-27 13:45 [pmg-devel] [PATCH pmg-api] restenv: pass arguments to check_node_is_master Stoiko Ivanov
2025-02-27 13:59 ` [pmg-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