Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
204e300d
Commit
204e300d
authored
13 years ago
by
kaloyane
Browse files
Options
Downloads
Patches
Plain Diff
[LMS-2654] handle invalid DSS URLs gracefully
SVN: 23683
parent
0704a0e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/OpenbisCrossOriginFilter.java
+7
-4
7 additions, 4 deletions
...cisd/openbis/generic/server/OpenbisCrossOriginFilter.java
with
7 additions
and
4 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/OpenbisCrossOriginFilter.java
+
7
−
4
View file @
204e300d
...
...
@@ -25,7 +25,6 @@ import java.util.List;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.web.context.support.WebApplicationContextUtils
;
import
ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel
;
import
ch.systemsx.cisd.common.servlet.AbstractCrossOriginFilter
;
import
ch.systemsx.cisd.openbis.generic.shared.ResourceNames
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataStore
;
...
...
@@ -85,12 +84,16 @@ public class OpenbisCrossOriginFilter extends AbstractCrossOriginFilter
List
<
DataStore
>
dataStores
=
commonServer
.
listDataStores
();
for
(
DataStore
dataStore
:
dataStores
)
{
dataStoreServerUrls
.
add
(
extractDomainFromDownloadUrl
(
dataStore
));
final
String
dssDomainOrNull
=
tryExtractDomainFromDownloadUrl
(
dataStore
);
if
(
dssDomainOrNull
!=
null
)
{
dataStoreServerUrls
.
add
(
dssDomainOrNull
);
}
}
return
dataStoreServerUrls
;
}
protected
String
e
xtractDomainFromDownloadUrl
(
DataStore
dataStore
)
protected
String
tryE
xtractDomainFromDownloadUrl
(
DataStore
dataStore
)
{
try
{
...
...
@@ -98,7 +101,7 @@ public class OpenbisCrossOriginFilter extends AbstractCrossOriginFilter
return
url
.
getProtocol
()
+
"://"
+
url
.
getAuthority
();
}
catch
(
MalformedURLException
ex
)
{
throw
CheckedExceptionTunnel
.
wrapIfNecessary
(
ex
)
;
return
null
;
}
}
...
...
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