Commit 65901e80 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3090 using CACHE_DIR instead of /tmp

Showing with 7 additions and 7 deletions
+7 -7
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2007 Fabian Hickert
Copyright (C) 2011-2013 FusionDirectory
Copyright (C) 2011-2014 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -25,11 +24,13 @@ class Step_Welcome extends setup_step
var $languages = array();
var $attributes = array();
var $header_image = "images/setup/welcome.png";
var $authPath;
function __construct()
{
$this->is_enabled = TRUE;
$this->is_active = TRUE;
$this->authPath = CACHE_DIR.'/fusiondirectory.auth';
$this->update_strings();
}
......@@ -45,7 +46,7 @@ class Step_Welcome extends setup_step
$smarty = get_smarty();
$smarty->assign('auth_id', session_id());
$smarty->assign("path", '/tmp/fusiondirectory.auth');
$smarty->assign("path", $this->authPath);
return $smarty->fetch(get_template_path("setup_welcome.tpl", TRUE, dirname(__FILE__)));
}
......@@ -54,9 +55,8 @@ class Step_Welcome extends setup_step
$id = "";
/* Get auth ID from file */
$path = '/tmp/fusiondirectory.auth';
if (file_exists($path) && is_readable($path)) {
$contents = file($path);
if (file_exists($this->authPath) && is_readable($this->authPath)) {
$contents = file($this->authPath);
$id = chop($contents[0]);
}
......
......@@ -25,7 +25,7 @@
<b>{t}To continue...{/t}</b>
</p>
<p>
{t}For security reasons you need to authenticate for the installation by creating the file '/tmp/fusiondirectory.auth', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t}
{t 1=$path}For security reasons you need to authenticate for the installation by creating the file '%1', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t}
</p>
<tt>
echo -n <b>{$auth_id}</b> &gt; {$path}
......
  • bmortier @bmortier

    mentioned in issue #1044

    By Côme Chilliet on 2017-09-02T15:10:17 (imported from GitLab)

    ·

    mentioned in issue #1044

    By Côme Chilliet on 2017-09-02T15:10:17 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment