Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
24e76158
Commit
24e76158
authored
Mar 24, 2016
by
Côme Chilliet
Browse files
Fixes
#4653
Improved fatal errors
parent
9ca02056
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/class_config.inc
View file @
24e76158
...
...
@@ -293,11 +293,12 @@ class config {
session
::
global_set
(
'HTTP_FDKEY_CACHE'
,
$cache
);
}
catch
(
Exception
$e
)
{
$msg
=
sprintf
(
_
(
'It seems you are trying to decode something which is not encoded : %s<br/>\n
'
.
_
(
'It seems you are trying to decode something which is not encoded : %s<br/>
'
.
"
\n
"
.
'Please check you are not using a fusiondirectory.secrets file while your passwords are not encrypted.'
),
$e
->
getMessage
()
);
msg_dialog
::
display
(
_
(
"Configuration error"
),
$msg
,
FATAL_ERROR_DIALOG
);
msg_dialog
::
display
(
_
(
'Configuration error'
),
$msg
,
FATAL_ERROR_DIALOG
);
exit
;
}
}
return
$cache
[
$creds
];
...
...
@@ -368,6 +369,10 @@ class config {
*/
function
set_current
(
$name
)
{
if
(
!
isset
(
$this
->
data
[
'LOCATIONS'
][
$name
]))
{
msg_dialog
::
display
(
_
(
'Error'
),
sprintf
(
_
(
'Location "%s" could not be found in the configuration file'
),
$name
),
FATAL_ERROR_DIALOG
);
exit
;
}
$this
->
current
=
$this
->
data
[
'LOCATIONS'
][
$name
];
if
(
isset
(
$this
->
current
[
'INITIAL_BASE'
]))
{
...
...
include/class_session.inc
View file @
24e76158
...
...
@@ -48,6 +48,7 @@ class session {
/* Sanity check */
if
(
!
session
::
channel_exists
(
$channel
))
{
msg_dialog
::
display
(
_
(
"Internal error"
),
_
(
"Requested channel does not exist! Please contact your Administrator."
),
FATAL_ERROR_DIALOG
);
exit
;
}
$channel
=
"gch_"
.
$channel
;
...
...
@@ -85,6 +86,7 @@ class session {
/* Sanity check */
if
(
!
session
::
channel_exists
(
$channel
))
{
msg_dialog
::
display
(
_
(
"Internal error"
),
_
(
"Requested channel does not exist! Please contact your Administrator."
),
FATAL_ERROR_DIALOG
);
exit
;
}
$_SESSION
[
$channel
][
$name
]
=
$value
;
}
...
...
@@ -123,6 +125,7 @@ class session {
/* Sanity check */
if
(
!
session
::
channel_exists
(
$channel
))
{
msg_dialog
::
display
(
_
(
"Internal error"
),
_
(
"Requested channel does not exist! Please contact your Administrator."
),
FATAL_ERROR_DIALOG
);
exit
;
}
$channel
=
"gch_"
.
$channel
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment