Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
5e9aa39f
Commit
5e9aa39f
authored
18 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Some security checks.
parent
813a902b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
web/root/blogs/blog_config.js
+5
-0
5 additions, 0 deletions
web/root/blogs/blog_config.js
web/root/blogs/blog_item.xjs
+8
-0
8 additions, 0 deletions
web/root/blogs/blog_item.xjs
web/root/blogs/msg_index.xjs
+2
-0
2 additions, 0 deletions
web/root/blogs/msg_index.xjs
with
15 additions
and
0 deletions
web/root/blogs/blog_config.js
+
5
−
0
View file @
5e9aa39f
...
...
@@ -33,6 +33,11 @@ var subject=parameters[6];
// exit(1);
//}
if
(
!
msg_area
.
sub
[
msg_code
].
can_read
)
{
write
(
"
<html><head><title>Error</title></head><body>Error opening
"
+
msg_code
+
"
!</body></html>
"
);
exit
(
1
);
}
var
msgbase
=
new
MsgBase
(
msg_code
);
if
(
!
msgbase
.
open
())
{
write
(
"
<html><head><title>Error</title></head><body>Error opening
"
+
msg_code
+
"
!</body></html>
"
);
...
...
This diff is collapsed.
Click to expand it.
web/root/blogs/blog_item.xjs
+
8
−
0
View file @
5e9aa39f
...
...
@@ -58,6 +58,10 @@ function not_found_error(reason)
}
var hdr=msgbase.get_msg_header(msgid);
if(hdr==null)
not_found_error("no header");
if(hdr.attr & (MSG_PRIVATE|MSG_DELETE))
not_found_error("not viewable");
if(hdr.from.toUpperCase() != poster.toUpperCase())
not_found_error("poster");
//if(hdr.from_ext != pnum)
...
...
@@ -126,6 +130,10 @@ while(1) {
}
}
hdr=msgbase.get_msg_header(msgid);
if(hdr==null)
continue;
if(hdr.attr & (MSG_PRIVATE|MSG_DELETE))
continue;
var body=msgbase.get_msg_body(msgid, true);
body=html_encode(body,true,true,false,false);
//body=body.split(" ").join("</p><p>");
...
...
This diff is collapsed.
Click to expand it.
web/root/blogs/msg_index.xjs
+
2
−
0
View file @
5e9aa39f
...
...
@@ -6,6 +6,8 @@
<?xjs
for(var grp in msg_area.grp_list) {
for(var sub in msg_area.grp_list[grp].sub_list) {
if(!msg_area.grp_list[grp].sub_list[sub].can_read)
continue;
write('<a href="'+msg_area.grp_list[grp].sub_list[sub].code+'/">'+msg_area.grp_list[grp].sub_list[sub].description+'</a><br>');
}
}
...
...
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