Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
dfa3aaa0
Commit
dfa3aaa0
authored
7 years ago
by
Roeland Jago Douma
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4753 from nextcloud/fix-links-on-error-page
Fix escaped HTML on error pages
parents
684997f7
9309217e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/base.php
+2
-3
2 additions, 3 deletions
lib/base.php
lib/private/Config.php
+1
-2
1 addition, 2 deletions
lib/private/Config.php
lib/private/legacy/util.php
+8
-12
8 additions, 12 deletions
lib/private/legacy/util.php
with
11 additions
and
17 deletions
lib/base.php
+
2
−
3
View file @
dfa3aaa0
...
@@ -246,9 +246,8 @@ class OC {
...
@@ -246,9 +246,8 @@ class OC {
}
else
{
}
else
{
OC_Template
::
printErrorPage
(
OC_Template
::
printErrorPage
(
$l
->
t
(
'Cannot write into "config" directory!'
),
$l
->
t
(
'Cannot write into "config" directory!'
),
$l
->
t
(
'This can usually be fixed by '
$l
->
t
(
'This can usually be fixed by giving the webserver write access to the config directory. See %s'
,
.
'%sgiving the webserver write access to the config directory%s.'
,
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)
])
array
(
'<a href="'
.
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)
.
'" target="_blank" rel="noreferrer">'
,
'</a>'
))
);
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/private/Config.php
+
1
−
2
View file @
dfa3aaa0
...
@@ -249,8 +249,7 @@ class Config {
...
@@ -249,8 +249,7 @@ class Config {
$url
=
\OC
::
$server
->
getURLGenerator
()
->
linkToDocs
(
'admin-dir_permissions'
);
$url
=
\OC
::
$server
->
getURLGenerator
()
->
linkToDocs
(
'admin-dir_permissions'
);
throw
new
HintException
(
throw
new
HintException
(
"Can't write into config directory!"
,
"Can't write into config directory!"
,
'This can usually be fixed by '
'This can usually be fixed by giving the webserver write access to the config directory. See '
.
$url
);
.
'<a href="'
.
$url
.
'" target="_blank" rel="noreferrer">giving the webserver write access to the config directory</a>.'
);
}
}
// Try to acquire a file lock
// Try to acquire a file lock
...
...
This diff is collapsed.
Click to expand it.
lib/private/legacy/util.php
+
8
−
12
View file @
dfa3aaa0
...
@@ -669,9 +669,8 @@ class OC_Util {
...
@@ -669,9 +669,8 @@ class OC_Util {
if
(
!
is_writable
(
OC
::
$configDir
)
or
!
is_readable
(
OC
::
$configDir
))
{
if
(
!
is_writable
(
OC
::
$configDir
)
or
!
is_readable
(
OC
::
$configDir
))
{
$errors
[]
=
array
(
$errors
[]
=
array
(
'error'
=>
$l
->
t
(
'Cannot write into "config" directory'
),
'error'
=>
$l
->
t
(
'Cannot write into "config" directory'
),
'hint'
=>
$l
->
t
(
'This can usually be fixed by '
'hint'
=>
$l
->
t
(
'This can usually be fixed by giving the webserver write access to the config directory. See %s'
,
.
'%sgiving the webserver write access to the config directory%s.'
,
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)])
array
(
'<a href="'
.
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)
.
'" target="_blank" rel="noreferrer">'
,
'</a>'
))
);
);
}
}
}
}
...
@@ -684,10 +683,9 @@ class OC_Util {
...
@@ -684,10 +683,9 @@ class OC_Util {
)
{
)
{
$errors
[]
=
array
(
$errors
[]
=
array
(
'error'
=>
$l
->
t
(
'Cannot write into "apps" directory'
),
'error'
=>
$l
->
t
(
'Cannot write into "apps" directory'
),
'hint'
=>
$l
->
t
(
'This can usually be fixed by '
'hint'
=>
$l
->
t
(
'This can usually be fixed by giving the webserver write access to the apps directory'
.
'%sgiving the webserver write access to the apps directory%s'
.
' or disabling the appstore in the config file. See %s'
,
.
' or disabling the appstore in the config file.'
,
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)])
array
(
'<a href="'
.
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)
.
'" target="_blank" rel="noreferrer">'
,
'</a>'
))
);
);
}
}
}
}
...
@@ -700,16 +698,14 @@ class OC_Util {
...
@@ -700,16 +698,14 @@ class OC_Util {
}
else
{
}
else
{
$errors
[]
=
[
$errors
[]
=
[
'error'
=>
$l
->
t
(
'Cannot create "data" directory'
),
'error'
=>
$l
->
t
(
'Cannot create "data" directory'
),
'hint'
=>
$l
->
t
(
'This can usually be fixed by '
'hint'
=>
$l
->
t
(
'This can usually be fixed by giving the webserver write access to the root directory. See %s'
,
.
'<a href="%s" target="_blank" rel="noreferrer">giving the webserver write access to the root directory</a>.'
,
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)])
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)])
];
];
}
}
}
else
if
(
!
is_writable
(
$CONFIG_DATADIRECTORY
)
or
!
is_readable
(
$CONFIG_DATADIRECTORY
))
{
}
else
if
(
!
is_writable
(
$CONFIG_DATADIRECTORY
)
or
!
is_readable
(
$CONFIG_DATADIRECTORY
))
{
//common hint for all file permissions error messages
//common hint for all file permissions error messages
$permissionsHint
=
$l
->
t
(
'Permissions can usually be fixed by '
$permissionsHint
=
$l
->
t
(
'Permissions can usually be fixed by giving the webserver write access to the root directory. See %.'
,
.
'%sgiving the webserver write access to the root directory%s.'
,
[
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)]);
[
'<a href="'
.
$urlGenerator
->
linkToDocs
(
'admin-dir_permissions'
)
.
'" target="_blank" rel="noreferrer">'
,
'</a>'
]);
$errors
[]
=
[
$errors
[]
=
[
'error'
=>
'Your data directory is not writable'
,
'error'
=>
'Your data directory is not writable'
,
'hint'
=>
$permissionsHint
'hint'
=>
$permissionsHint
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment