[GH-ISSUE #19] Update for Pritunl v1.30.3112.0 #16

Closed
opened 2026-02-27 23:03:24 +03:00 by kerem · 7 comments
Owner

Originally created by @MANKUD on GitHub (Mar 21, 2022).
Original GitHub issue: https://github.com/simonmicro/Pritunl-Fake-API/issues/19

Hello,

The updated script does not seem to be working on the latest release pritunl v1.30.3112.0. There are changes made in the subscription.py file.

github.com/pritunl/pritunl@97f08a9ad6

image

image

image

image

Originally created by @MANKUD on GitHub (Mar 21, 2022). Original GitHub issue: https://github.com/simonmicro/Pritunl-Fake-API/issues/19 Hello, The updated script does not seem to be working on the latest release pritunl v1.30.3112.0. There are changes made in the subscription.py file. https://github.com/pritunl/pritunl/commit/97f08a9ad634086cc19f38cfdd67cc93bc5eecb0 ![image](https://user-images.githubusercontent.com/83474708/159378668-6719da65-c4d0-4431-9618-92a4078d3b7a.png) ![image](https://user-images.githubusercontent.com/83474708/159378673-4d5e671f-7f0d-464a-a646-1cc50a734a9e.png) ![image](https://user-images.githubusercontent.com/83474708/159378687-bd563ba2-e5bc-4dc4-bee7-01aeaf917d21.png) ![image](https://user-images.githubusercontent.com/83474708/159378690-90cd013a-0928-4332-9049-1faea83d9ae2.png)
kerem closed this issue 2026-02-27 23:03:25 +03:00
Author
Owner

@simonmicro commented on GitHub (Mar 21, 2022):

-> for more context: https://github.com/simonmicro/Pritunl-Fake-API/issues/18#issuecomment-1074505700 (and following)

<!-- gh-comment-id:1074519083 --> @simonmicro commented on GitHub (Mar 21, 2022): -> for more context: https://github.com/simonmicro/Pritunl-Fake-API/issues/18#issuecomment-1074505700 (and following)
Author
Owner

@MANKUD commented on GitHub (Mar 21, 2022):

why do you think he deleted them here?

github.com/pritunl/pritunl@cc02ed7ab0

<!-- gh-comment-id:1074523122 --> @MANKUD commented on GitHub (Mar 21, 2022): why do you think he deleted them here? https://github.com/pritunl/pritunl/commit/cc02ed7ab0d16af7a83c70d27227c0bafdf96073
Author
Owner

@simonmicro commented on GitHub (Mar 21, 2022):

Performance? Complexity on his side? Idk. To fix this I have to dive deeper into the inner workings of Pritunl anyways, so I can't say if this patch was even the real reason...

<!-- gh-comment-id:1074525235 --> @simonmicro commented on GitHub (Mar 21, 2022): Performance? Complexity on his side? Idk. To fix this I have to dive deeper into the inner workings of Pritunl anyways, so I can't say if this patch was even the real reason...
Author
Owner

@MANKUD commented on GitHub (Mar 21, 2022):

"Performance? Complexity on his side?" Makes sense and I hope for the best 😄

<!-- gh-comment-id:1074527486 --> @MANKUD commented on GitHub (Mar 21, 2022): "_Performance? Complexity on his side?_" Makes sense and I hope for the best 😄
Author
Owner

@MANKUD commented on GitHub (Mar 21, 2022):

Hi did you notice the path?

github.com/pritunl/pritunl@cc02ed7ab0

pritunl/handlers/subscription.py kind of weird

<!-- gh-comment-id:1074533158 --> @MANKUD commented on GitHub (Mar 21, 2022): Hi did you notice the path? https://github.com/pritunl/pritunl/commit/cc02ed7ab0d16af7a83c70d27227c0bafdf96073 **pritunl/handlers/subscription.py** kind of weird
Author
Owner

@simonmicro commented on GitHub (Mar 28, 2022):

Hehe - found something... The file /www/vendor/dist/js/main.***.js changed:

window.subActive = model.get("active"), window.subPlan = model.get("plan"), window.subVer = model.get("version"), window.theme = model.get("theme"), window.superUser = model.get("super_user"), window.sso = model.get("sso"), window.csrfToken = model.get("csrf_token"), window.subActive && "dark" === window.theme ? $("body").addClass("dark") : $("body").removeClass("dark"), window.subActive ? "premium" === window.subPlan ? $("body").addClass("premium-" + model.get("user").slice(0, 8)) : "enterprise" === window.subPlan ? $("body").addClass("enterprise-" + model.get("user").slice(0, 8)) : "enterprise_plus" === window.subPlan && $("body").addClass("enterprise-plus-" + model.get("user").slice(0, 8)) : "premium" === window.subPlan ? $("body").addClass("premium-license") : "enterprise" === window.subPlan ? $("body").addClass("enterprise-license") : "enterprise-plus" === window.subPlan && $("body").addClass("enterprise-plus-license"), window.superUser ? $("body").addClass("super-user") : $("body").removeClass("super-user"), init()

to

window.subActive = model.get("active"), window.subPlan = model.get("plan"), window.subVer = model.get("version"), window.theme = model.get("theme"), window.superUser = model.get("super_user"), window.sso = model.get("sso"), window.csrfToken = model.get("csrf_token"), window.subActive && "dark" === window.theme ? $("body").addClass("dark") : $("body").removeClass("dark"), window.subActive ? "premium" === window.subPlan ? $("body").addClass("premium") : "enterprise" === window.subPlan ? $("body").addClass("enterprise") : "enterprise_plus" === window.subPlan && $("body").addClass("enterprise-plus") : "premium" === window.subPlan ? $("body").addClass("premium-license") : "enterprise" === window.subPlan ? $("body").addClass("enterprise-license") : "enterprise-plus" === window.subPlan && $("body").addClass("enterprise-plus-license"), window.superUser ? $("body").addClass("super-user") : $("body").removeClass("super-user"), init()

..which seems to break enterprise-plus / ultimate (see window.subPlan). To unbrick the subscription dialog you could execute this in the console:

document.body.classList.add('enterprise-plus-license')

Otherwise everything seems to work fine...

<!-- gh-comment-id:1080994271 --> @simonmicro commented on GitHub (Mar 28, 2022): Hehe - found something... The file `/www/vendor/dist/js/main.***.js` changed: ```js window.subActive = model.get("active"), window.subPlan = model.get("plan"), window.subVer = model.get("version"), window.theme = model.get("theme"), window.superUser = model.get("super_user"), window.sso = model.get("sso"), window.csrfToken = model.get("csrf_token"), window.subActive && "dark" === window.theme ? $("body").addClass("dark") : $("body").removeClass("dark"), window.subActive ? "premium" === window.subPlan ? $("body").addClass("premium-" + model.get("user").slice(0, 8)) : "enterprise" === window.subPlan ? $("body").addClass("enterprise-" + model.get("user").slice(0, 8)) : "enterprise_plus" === window.subPlan && $("body").addClass("enterprise-plus-" + model.get("user").slice(0, 8)) : "premium" === window.subPlan ? $("body").addClass("premium-license") : "enterprise" === window.subPlan ? $("body").addClass("enterprise-license") : "enterprise-plus" === window.subPlan && $("body").addClass("enterprise-plus-license"), window.superUser ? $("body").addClass("super-user") : $("body").removeClass("super-user"), init() ``` to ```js window.subActive = model.get("active"), window.subPlan = model.get("plan"), window.subVer = model.get("version"), window.theme = model.get("theme"), window.superUser = model.get("super_user"), window.sso = model.get("sso"), window.csrfToken = model.get("csrf_token"), window.subActive && "dark" === window.theme ? $("body").addClass("dark") : $("body").removeClass("dark"), window.subActive ? "premium" === window.subPlan ? $("body").addClass("premium") : "enterprise" === window.subPlan ? $("body").addClass("enterprise") : "enterprise_plus" === window.subPlan && $("body").addClass("enterprise-plus") : "premium" === window.subPlan ? $("body").addClass("premium-license") : "enterprise" === window.subPlan ? $("body").addClass("enterprise-license") : "enterprise-plus" === window.subPlan && $("body").addClass("enterprise-plus-license"), window.superUser ? $("body").addClass("super-user") : $("body").removeClass("super-user"), init() ``` ..which seems to break `enterprise-plus` / `ultimate` (see `window.subPlan`). To unbrick the subscription dialog you could execute this in the console: ```js document.body.classList.add('enterprise-plus-license') ``` Otherwise everything seems to work fine...
Author
Owner

@simonmicro commented on GitHub (Mar 28, 2022):

Well, the previous changes were reverted and the JS changed a bit. We are up and running again...

<!-- gh-comment-id:1081153672 --> @simonmicro commented on GitHub (Mar 28, 2022): Well, the previous changes were reverted and the JS changed a bit. We are up and running again...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Pritunl-Fake-API#16
No description provided.