You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

<?php
ini_set('log_errors', 1);
ini_set('display_errors', 0);
require('conf.php');
if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERVER['QUERY_STRING'])) {
$temp = explode('@', $_SERVER['QUERY_STRING']);
$uid = $temp[0];
// Bind to the LDAP server
// Not used for now, but might be usefull one day to generate conf per group or per user
$link = @ldap_connect(LDAP_SERVER) or die ("Couldn't connect to the LDAP server");
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_bind($link) or die ("Couldn't bind to the LDAP server");
// Lookup the user
$result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result);
if($user['count'] == 0) {
// user not found
exit;
}
}
else {
exit;
}
?>
// Disable auto updates
<?php echo FF_PREF;?>("app.update.enabled", false);
<?php echo FF_PREF;?>("app.update.auto", false);
// Extensions
<?php echo FF_PREF;?>("extensions.installDistroAddons", true);
<?php echo FF_PREF;?>("extensions.enabledScopes", 13);
<?php echo FF_PREF;?>("extensions.autoDisableScopes", 2);
// Disable the "know your rights" message
<?php echo FF_PREF;?>("browser.rights.3.shown", true);
// Home page
<?php
if (FF_PREF == 'lockPref'){
// Bug somewhere: defaultPref doesn't set the home page
// only lockPref works
echo 'lockPref("browser.startup.homepage", "'.HOME_URL.'");'."\n";
echo 'lockPref("browser.startup.page", 1);'."\n";
}
?>
<?php echo FF_PREF;?>("startup.homepage_override_url", "");
<?php echo FF_PREF;?>("startup.homepage_welcome_url", "");
// Do not check for default browser
<?php echo FF_PREF;?>("browser.shell.checkDefaultBrowser", false);
// Disable popup blocker
// not that very useful anymore, and blocks legitim popups from SOGo
<?php echo FF_PREF;?>("dom.disable_open_during_load", false);
// Block 3rd party cookies
<?php echo FF_PREF;?>("network.cookie.cookieBehavior", 1);