Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
6c841e30
Commit
6c841e30
authored
10 years ago
by
Jaime Pérez Crespo
Browse files
Options
Downloads
Plain Diff
Merge pull request #210 from thijskh/metaconvert-fileupload
Support file uploads in metadata converter.
parents
ddedd9e7
29635688
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
dictionaries/admin.definition.json
+3
-0
3 additions, 0 deletions
dictionaries/admin.definition.json
templates/metadata-converter.php
+5
-1
5 additions, 1 deletion
templates/metadata-converter.php
www/admin/metadata-converter.php
+5
-1
5 additions, 1 deletion
www/admin/metadata-converter.php
with
13 additions
and
2 deletions
dictionaries/admin.definition.json
+
3
−
0
View file @
6c841e30
...
@@ -83,6 +83,9 @@
...
@@ -83,6 +83,9 @@
"metaconv_title"
:
{
"metaconv_title"
:
{
"en"
:
"Metadata parser"
"en"
:
"Metadata parser"
},
},
"metaconv_selectfile"
:
{
"en"
:
"or select a file:"
},
"metaconv_parse"
:
{
"metaconv_parse"
:
{
"en"
:
"Parse"
"en"
:
"Parse"
},
},
...
...
This diff is collapsed.
Click to expand it.
templates/metadata-converter.php
+
5
−
1
View file @
6c841e30
...
@@ -7,12 +7,16 @@ $this->includeAtTemplateBase('includes/header.php');
...
@@ -7,12 +7,16 @@ $this->includeAtTemplateBase('includes/header.php');
<h2>
<?php
echo
$this
->
t
(
'metaconv_title'
);
?>
</h2>
<h2>
<?php
echo
$this
->
t
(
'metaconv_title'
);
?>
</h2>
<form
action=
"?"
method=
"post"
>
<form
action=
"?"
method=
"post"
enctype=
"multipart/form-data"
>
<p>
<?php
echo
(
$this
->
t
(
'{admin:metaconv_xmlmetadata}'
));
?>
</p>
<p>
<?php
echo
(
$this
->
t
(
'{admin:metaconv_xmlmetadata}'
));
?>
</p>
<p>
<p>
<textarea
rows=
"20"
cols=
"120"
name=
"xmldata"
>
<?php
echo
htmlspecialchars
(
$this
->
data
[
'xmldata'
]);
?>
</textarea>
<textarea
rows=
"20"
cols=
"120"
name=
"xmldata"
>
<?php
echo
htmlspecialchars
(
$this
->
data
[
'xmldata'
]);
?>
</textarea>
</p>
</p>
<p>
<?php
echo
$this
->
t
(
'metaconv_selectfile'
);
?>
<input
type=
"file"
name=
"xmlfile"
/></p>
<p>
<p>
<input
type=
"submit"
value=
"
<?php
echo
$this
->
t
(
'metaconv_parse'
);
?>
"
/>
<input
type=
"submit"
value=
"
<?php
echo
$this
->
t
(
'metaconv_parse'
);
?>
"
/>
</p>
</p>
...
...
This diff is collapsed.
Click to expand it.
www/admin/metadata-converter.php
+
5
−
1
View file @
6c841e30
...
@@ -7,9 +7,13 @@ SimpleSAML\Utils\Auth::requireAdmin();
...
@@ -7,9 +7,13 @@ SimpleSAML\Utils\Auth::requireAdmin();
$config
=
SimpleSAML_Configuration
::
getInstance
();
$config
=
SimpleSAML_Configuration
::
getInstance
();
if
(
array_key_exists
(
'xmldata'
,
$_POST
))
{
if
(
!
empty
(
$_FILES
[
'xmlfile'
][
'tmp_name'
])
)
{
$xmldata
=
file_get_contents
(
$_FILES
[
'xmlfile'
][
'tmp_name'
]);
}
elseif
(
array_key_exists
(
'xmldata'
,
$_POST
)
)
{
$xmldata
=
$_POST
[
'xmldata'
];
$xmldata
=
$_POST
[
'xmldata'
];
}
if
(
!
empty
(
$xmldata
)
)
{
\SimpleSAML\Utils\XML
::
checkSAMLMessage
(
$xmldata
,
'saml-meta'
);
\SimpleSAML\Utils\XML
::
checkSAMLMessage
(
$xmldata
,
'saml-meta'
);
$entities
=
SimpleSAML_Metadata_SAMLParser
::
parseDescriptorsString
(
$xmldata
);
$entities
=
SimpleSAML_Metadata_SAMLParser
::
parseDescriptorsString
(
$xmldata
);
...
...
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