Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
ac6101d2
Verified
Commit
ac6101d2
authored
Feb 28, 2020
by
Cyril Vazquez
Browse files
Change regexp to detect base64 encoded contents on args
parent
3e8961b5
Pipeline
#7090
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bundle/medona/Controller/ArchiveTransfer.php
View file @
ac6101d2
...
...
@@ -168,7 +168,7 @@ class ArchiveTransfer extends abstractMessage
break
;
case
is_string
(
$messageFile
)
&&
preg_match
(
'%^[a-zA-Z0-9/+]*={0,2}$%'
,
$messageFile
)
:
preg_match
(
'%^[a-zA-Z0-9
\\\\
/+]*={0,2}$%'
,
$messageFile
)
:
$data
=
base64_decode
(
$messageFile
);
break
;
...
...
@@ -298,7 +298,7 @@ class ArchiveTransfer extends abstractMessage
}
elseif
(
is_object
(
$attachment
))
{
if
(
filter_var
(
$attachment
->
data
,
FILTER_VALIDATE_URL
))
{
$data
=
stream_get_contents
(
$attachment
->
data
);
}
elseif
(
preg_match
(
'%^[a-zA-Z0-9/+]*={0,2}$%'
,
$attachment
->
data
))
{
}
elseif
(
preg_match
(
'%^[a-zA-Z0-9
\\\\
/+]*={0,2}$%'
,
$attachment
->
data
))
{
$data
=
base64_decode
(
$attachment
->
data
);
}
elseif
(
is_file
(
$attachment
->
data
))
{
$data
=
file_get_contents
(
$attachment
->
data
);
...
...
src/bundle/recordsManagement/Controller/archiveEntryTrait.php
View file @
ac6101d2
...
...
@@ -135,7 +135,7 @@ trait archiveEntryTrait
break
;
case
is_string
(
$receivedHandler
)
&&
preg_match
(
'%^[a-zA-Z0-9/+]*={0,2}$%'
,
$receivedHandler
)
:
preg_match
(
'%^[a-zA-Z0-9
\\\\
/+]*={0,2}$%'
,
$receivedHandler
)
:
$handler
=
\
laabs
::
createTempStream
(
base64_decode
(
$receivedHandler
));
break
;
...
...
src/bundle/recordsManagement/Controller/archiveModificationTrait.php
View file @
ac6101d2
...
...
@@ -674,7 +674,7 @@ trait archiveModificationTrait
break
;
case
is_string
(
$contents
)
&&
preg_match
(
'%^[a-zA-Z0-9/+]*={0,2}$%'
,
$contents
)
:
preg_match
(
'%^[a-zA-Z0-9
\\\\
/+]*={0,2}$%'
,
$contents
)
:
$handler
=
\
laabs
::
createTempStream
(
base64_decode
(
$contents
));
break
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment