Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
35a23bec
Commit
35a23bec
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
oops: Fixup image stripping (again)
parent
b7051107
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class.file.php
+1
-1
1 addition, 1 deletion
include/class.file.php
include/class.thread.php
+5
-5
5 additions, 5 deletions
include/class.thread.php
with
6 additions
and
6 deletions
include/class.file.php
+
1
−
1
View file @
35a23bec
...
...
@@ -94,7 +94,7 @@ class AttachmentFile {
}
function
getKey
()
{
return
$this
->
ht
[
'key'
];
return
strtolower
(
$this
->
ht
[
'key'
]
)
;
}
function
getSignature
()
{
...
...
This diff is collapsed.
Click to expand it.
include/class.thread.php
+
5
−
5
View file @
35a23bec
...
...
@@ -886,7 +886,7 @@ Class ThreadEntry {
// ->convert() because the strippedImages list will not propagate to
// the newly converted thread body
if
(
$vars
[
'attachments'
])
{
foreach
(
$body
->
getStrippedImages
()
as
$cid
)
{
foreach
(
$
vars
[
'
body
'
]
->
getStrippedImages
()
as
$cid
)
{
foreach
(
$vars
[
'attachments'
]
as
$i
=>
$a
)
{
if
(
@
$a
[
'cid'
]
&&
$a
[
'cid'
]
==
$cid
)
{
// Inline referenced attachment was stripped
...
...
@@ -1178,8 +1178,8 @@ class ThreadBody /* extends SplString */ {
// Capture a list of inline images
$images_before
=
$images_after
=
array
();
preg_match_all
(
'/src="cid:([\w_-]+)
"
/'
,
$this
->
body
,
$images_before
,
PREG_
SET
_ORDER
);
preg_match_all
(
'/src="cid:([\w_-]+)
(?:@|")
/'
,
$this
->
body
,
$images_before
,
PREG_
PATTERN
_ORDER
);
// Strip the quoted part of the body
if
((
list
(
$msg
)
=
explode
(
$tag
,
$this
->
body
,
2
))
&&
trim
(
$msg
))
{
...
...
@@ -1187,8 +1187,8 @@ class ThreadBody /* extends SplString */ {
// Capture a list of dropped inline images
if
(
$images_before
)
{
preg_match_all
(
'/src="cid:([\w_-]+)
"
/'
,
$this
->
body
,
$images_after
,
PREG_
SET
_ORDER
);
preg_match_all
(
'/src="cid:([\w_-]+)
(?:@|")
/'
,
$this
->
body
,
$images_after
,
PREG_
PATTERN
_ORDER
);
$this
->
stripped_images
=
array_diff
(
$images_before
[
1
],
$images_after
[
1
]);
}
...
...
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