aboutsummaryrefslogtreecommitdiff
path: root/radicale-proxy-ldap-auth-fn.js.patch
blob: 0af2d89bc4e406d86aed5e8fb37687d4f99239ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Last-modified: 2024-06-30-1 16:59
Version: 3.2.2-1.el8.noarch
Message: Update my customization to radicale to depend on my HTTP_X_REMOTE_USER header by removing the authentication in the calls here.
--- /usr/lib/python3.9/site-packages/radicale/web/internal_data/fn.js.orig	2024-06-18 13:01:16.000000000 -0400
+++ /usr/lib/python3.9/site-packages/radicale/web/internal_data/fn.js	2024-06-30 16:55:44.727935645 -0400
@@ -150,7 +150,7 @@
  */
 function get_principal(user, password, callback) {
     let request = new XMLHttpRequest();
-    request.open("PROPFIND", SERVER + ROOT_PATH, true, user, encodeURIComponent(password));
+    request.open("PROPFIND", SERVER + ROOT_PATH, true); //, user, encodeURIComponent(password));
     request.onreadystatechange = function() {
         if (request.readyState !== 4) {
             return;
@@ -194,7 +194,7 @@
  */
 function get_collections(user, password, collection, callback) {
     let request = new XMLHttpRequest();
-    request.open("PROPFIND", SERVER + collection.href, true, user, encodeURIComponent(password));
+    request.open("PROPFIND", SERVER + collection.href, true); //, user, encodeURIComponent(password));
     request.setRequestHeader("depth", "1");
     request.onreadystatechange = function() {
         if (request.readyState !== 4) {
@@ -342,7 +342,7 @@
  */
 function delete_collection(user, password, collection, callback) {
     let request = new XMLHttpRequest();
-    request.open("DELETE", SERVER + collection.href, true, user, encodeURIComponent(password));
+    request.open("DELETE", SERVER + collection.href, true); //, user, encodeURIComponent(password));
     request.onreadystatechange = function() {
         if (request.readyState !== 4) {
             return;
@@ -367,7 +367,7 @@
  */
 function create_edit_collection(user, password, collection, create, callback) {
     let request = new XMLHttpRequest();
-    request.open(create ? "MKCOL" : "PROPPATCH", SERVER + collection.href, true, user, encodeURIComponent(password));
+    request.open(create ? "MKCOL" : "PROPPATCH", SERVER + collection.href, true); //, user, encodeURIComponent(password));
     request.onreadystatechange = function() {
         if (request.readyState !== 4) {
             return;
@@ -569,7 +569,7 @@
         try {
             read_form();
             let password = password_form.value;
-            if (user) {
+            if (true) {
                 error = "";
                 // setup logout
                 logout_view.classList.remove("hidden");
@@ -636,6 +636,8 @@
         pop_scene(scene_stack.length-2);
     }
 
+    this.onlogin = onlogin;
+
     this.show = function() {
         remove_logout();
         fill_form();
@@ -1390,7 +1392,9 @@
 function main() {
     // Hide startup loading message
     document.getElementById("loadingscene").classList.add("hidden");
-    push_scene(new LoginScene(), false);
+    let nLS = new LoginScene();
+    setTimeout(function(){nLS.onlogin();}, 200);
+    push_scene(nLS, false);
 }
 
 window.addEventListener("load", main);
bgstack15