config: error in writing to ifmap if " or ' present in name

Bug #1449156 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
Critical
Hampapur Ajay
R2.0
Fix Committed
Undecided
Hampapur Ajay
R2.1
Fix Committed
Undecided
Hampapur Ajay
R2.20
Fix Committed
Undecided
Hampapur Ajay

Bug Description

The presence of a single or double quote in the name of an object leads to an error while updating the ifmap server. While escape/unescape routines in sax parser were used, by default they escape only <, > and &.

On restart of api-server without a fix for this bug initial write to ifmap server with the full configuration fails.

Tags: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/9554
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9554
Committed: http://github.org/Juniper/contrail-controller/commit/7370c304205d792c37eff05f2cf0e5101b308c29
Submitter: Zuul
Branch: master

commit 7370c304205d792c37eff05f2cf0e5101b308c29
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:22:24 2015 -0700

config: escape any quotes in name of resource on ifmap write.

Define a version of escape/unescape that invokes the sax library
based ones with additional escapes for single and double-quotes.

A 'patch' to do the same on already deployed systems is at
https://gist.github.com/ajayhn/603c3f8168132aba6e5d

Change-Id: Ifcae17e80ffc1528908f37f79c3215887487ca14
Partial-Bug: #1449156

tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/9608
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/9612
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.0

Review in progress for https://review.opencontrail.org/9623
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9608
Committed: http://github.org/Juniper/contrail-generateDS/commit/261d2bbad2cb57acc149f694d425fa3df611d08f
Submitter: Zuul
Branch: master

commit 261d2bbad2cb57acc149f694d425fa3df611d08f
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:26:13 2015 -0700

config: escape quotes in any property of a resource for ifmap write

Change-Id: I7e1a53c10c623a5bfeff64444800753607eb80e7
Closes-Bug: #1449156

Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/9612
Committed: http://github.org/Juniper/contrail-controller/commit/ad33aeb96a4eacb1155b40f24f07ecfa8a455718
Submitter: Zuul
Branch: R2.1

commit ad33aeb96a4eacb1155b40f24f07ecfa8a455718
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:22:24 2015 -0700

config: escape any quotes in name of resource on ifmap write.

Define a version of escape/unescape that invokes the sax library
based ones with additional escapes for single and double-quotes.

A 'patch' to do the same on already deployed systems is at
https://gist.github.com/ajayhn/603c3f8168132aba6e5d

Change-Id: Ifcae17e80ffc1528908f37f79c3215887487ca14
Partial-Bug: #1449156
(cherry picked from commit 7370c304205d792c37eff05f2cf0e5101b308c29)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/9690
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.0

Review in progress for https://review.opencontrail.org/9691
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9623
Committed: http://github.org/Juniper/contrail-controller/commit/f16323ddd64522216ecb9a9808a83393472806ad
Submitter: Zuul
Branch: R2.0

commit f16323ddd64522216ecb9a9808a83393472806ad
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:22:24 2015 -0700

config: escape any quotes in name of resource on ifmap write.

Define a version of escape/unescape that invokes the sax library
based ones with additional escapes for single and double-quotes.

A 'patch' to do the same on already deployed systems is at
https://gist.github.com/ajayhn/603c3f8168132aba6e5d

Change-Id: Ifcae17e80ffc1528908f37f79c3215887487ca14
Partial-Bug: #1449156
(cherry picked from commit 7370c304205d792c37eff05f2cf0e5101b308c29)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/9691
Committed: http://github.org/Juniper/contrail-generateDS/commit/4462366cdb67950d1031f13cda87f2f0297ab13a
Submitter: Zuul
Branch: R2.0

commit 4462366cdb67950d1031f13cda87f2f0297ab13a
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:26:13 2015 -0700

config: escape quotes in any property of a resource for ifmap write

Change-Id: I7e1a53c10c623a5bfeff64444800753607eb80e7
Closes-Bug: #1449156
(cherry picked from commit 261d2bbad2cb57acc149f694d425fa3df611d08f)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/9610
Committed: http://github.org/Juniper/contrail-controller/commit/798a07dda51193bbad1ccd37ae52a7920b6c307b
Submitter: Zuul
Branch: R2.20

commit 798a07dda51193bbad1ccd37ae52a7920b6c307b
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:22:24 2015 -0700

config: escape any quotes in name of resource on ifmap write.

Define a version of escape/unescape that invokes the sax library
based ones with additional escapes for single and double-quotes.

A 'patch' to do the same on already deployed systems is at
https://gist.github.com/ajayhn/603c3f8168132aba6e5d

Change-Id: Ifcae17e80ffc1528908f37f79c3215887487ca14
Partial-Bug: #1449156

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.20

Review in progress for https://review.opencontrail.org/9836
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9690
Committed: http://github.org/Juniper/contrail-generateDS/commit/a2e7460ac22ecb34235f819a8e7a59805c7b73fd
Submitter: Zuul
Branch: R2.1

commit a2e7460ac22ecb34235f819a8e7a59805c7b73fd
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:26:13 2015 -0700

config: escape quotes in any property of a resource for ifmap write

Change-Id: I7e1a53c10c623a5bfeff64444800753607eb80e7
Closes-Bug: #1449156
(cherry picked from commit 261d2bbad2cb57acc149f694d425fa3df611d08f)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/9836
Committed: http://github.org/Juniper/contrail-generateDS/commit/f92fa8d217102fbba3c00fd865969bbcfbac8443
Submitter: Zuul
Branch: R2.20

commit f92fa8d217102fbba3c00fd865969bbcfbac8443
Author: Hampapur Ajay <email address hidden>
Date: Mon Apr 27 10:26:13 2015 -0700

config: escape quotes in any property of a resource for ifmap write

Change-Id: I7e1a53c10c623a5bfeff64444800753607eb80e7
Closes-Bug: #1449156
(cherry picked from commit 261d2bbad2cb57acc149f694d425fa3df611d08f)

information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.