Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
8cb57772
Commit
8cb57772
authored
May 18, 2020
by
Andre Freyssinet
Browse files
Prevent issues with JNDI names including '/' (JORAM-356).
parent
49338932
Changes
1
Hide whitespace changes
Inline
Side-by-side
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
View file @
8cb57772
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2017 - 20
19
ScalAgent Distributed Technologies
* Copyright (C) 2017 - 20
20
ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -24,8 +24,10 @@ package com.scalagent.joram.mom.dest.rest;
import
java.io.ByteArrayOutputStream
;
import
java.io.ObjectOutputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.lang.reflect.Constructor
;
import
java.net.URI
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -144,6 +146,12 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
if
(
destName
==
null
)
{
logger
.
log
(
BasicLevel
.
ERROR
,
"Missing Destination JNDI name, should fixed property "
+
DestinationConstants
.
DESTINATION_NAME_PROP
);
}
else
{
try
{
destName
=
URLEncoder
.
encode
(
destName
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
exc
)
{
// Should never happened
}
}
if
(
properties
.
containsKey
(
DestinationConstants
.
MEDIA_TYPE_JSON_PROP
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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