summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-05-25 15:55:13 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-06-22 10:44:45 +0200
commit0948a9f91b3e423df4d06fd13d23b3ec7ccaa921 (patch)
treea1b7771bc37f8c77ca2facadfad4235a6cb15f9f
parent5a982358b563e163a792000ca04d8b26f3eecc4a (diff)
downloadfreeipa-0948a9f91b3e423df4d06fd13d23b3ec7ccaa921.zip
freeipa-0948a9f91b3e423df4d06fd13d23b3ec7ccaa921.tar.gz
freeipa-0948a9f91b3e423df4d06fd13d23b3ec7ccaa921.tar.xz
Set network.http.sendRefererHeader to 2 on browser config
IPA web UI isn't functional when browser doesn't send http headers. This patch adds a functionality which sets Firefox network.http.sendRefererHeader configuration option to value '2' which enables it. Possible values: http://kb.mozillazine.org/Network.http.sendRefererHeader https://fedorahosted.org/freeipa/ticket/2778
-rw-r--r--install/share/preferences.html.template24
1 files changed, 15 insertions, 9 deletions
diff --git a/install/share/preferences.html.template b/install/share/preferences.html.template
index a66576c..48bcc42 100644
--- a/install/share/preferences.html.template
+++ b/install/share/preferences.html.template
@@ -33,27 +33,33 @@
<script type="text/javascript">
function setPreferences() {
+ var privilege, setIntPref, setCharPref, setBoolPref;
+
if (typeof navigator.preference == 'undefined') {
// From Firefox 4 and SeaMonkey 2.1, navigator.preference intefrace is dropped
// Use new Gecko2 Services.jsm JavaScript code module instead.
- var privilege = 'UniversalXPConnect';
+ privilege = 'UniversalXPConnect';
netscape.security.PrivilegeManager.enablePrivilege(privilege);
Components.utils.import("resource://gre/modules/Services.jsm");
- var prefFuncChar = function(par, val) {Services.prefs.setCharPref(par, val)};
- var prefFuncBool = function(par, val) {Services.prefs.setBoolPref(par, val)};
+
+ setIntPref = function(par, val) {Services.prefs.setIntPref(par, val)};
+ setCharPref = function(par, val) {Services.prefs.setCharPref(par, val)};
+ setBoolPref = function(par, val) {Services.prefs.setBoolPref(par, val)};
} else {
- var privilege = 'UniversalPreferencesWrite';
+ privilege = 'UniversalPreferencesWrite';
netscape.security.PrivilegeManager.enablePrivilege(privilege);
- var prefFuncChar = function(par, val) {navigator.preference(par, val)};
- var prefFuncBool = prefFuncChar; // same function for bool and char
+ setCharPref = function(par, val) {navigator.preference(par, val)};
+ setBoolPref = setCharPref; // same function for bool and char and int
+ setIntPref = setCharPref;
}
try {
try {
- prefFuncBool('network.negotiate-auth.using-native-gsslib', true);
- prefFuncChar('network.negotiate-auth.trusted-uris', '.$DOMAIN');
- prefFuncBool('network.negotiate-auth.allow-proxies', true);
+ setIntPref('network.http.sendRefererHeader', 2);
+ setBoolPref('network.negotiate-auth.using-native-gsslib', true);
+ setCharPref('network.negotiate-auth.trusted-uris', '.$DOMAIN');
+ setBoolPref('network.negotiate-auth.allow-proxies', true);
} catch (e) {
alert("Unable to store preferences: " + e);
return;