Skip to content

Commit 03d8a24

Browse files
committed
Merge pull request #18 from GamerSource/testing
Testing
2 parents 33a462d + 36a37c0 commit 03d8a24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pve2_api.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,15 @@ public function login () {
120120
}
121121
}
122122

123+
# Sets the PVEAuthCookie
124+
# Attetion, after using this the user is logged into the web interface aswell!
125+
# Use with care, and DO NOT use with root, it may harm your system
123126
public function setCookie() {
124127
if (!$this->check_login_ticket()) {
125128
throw new PVE2_Exception("Not logged into Proxmox host. No Login access ticket found or ticket expired.", 3);
126129
}
127130

128-
setcookie("PVEAuthCookie",$this->login_ticket['ticket']);
131+
setrawcookie("PVEAuthCookie", $this->login_ticket['ticket'], 0, "/");
129132
}
130133

131134
/*

0 commit comments

Comments
 (0)