provider_location not validated by the manage snapshot API

Bug #2031048 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Goutham Pacha Ravi

Bug Description

Description
===========
When using the POST /share-snapshots/manage API, you could set junk values to the "provider_location" field; the API isn't validating this.

Steps to reproduce
==================

* Request to manage a snapshot of a share
* Set "provider_location" to be a dict instead of a string
* API responds with HTTP500

Expected result
===============
HTTP 400, indicating the parameter format error

Actual result
=============
Http 500 Internal Server Error

Environment
===========
1. devstack / master

Logs
====

Error in the API logs: https://paste.openstack.org/show/bd9VmnioIO3Nn7pANLUi

Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
milestone: none → bobcat-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/891138

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/manila/+/895032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/891138
Committed: https://opendev.org/openstack/manila/commit/f6725f7c1460187637aa1758f1a8f06b8e268b56
Submitter: "Zuul (22348)"
Branch: master

commit f6725f7c1460187637aa1758f1a8f06b8e268b56
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 17.0.0.0rc1

This issue was fixed in the openstack/manila 17.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/manila/+/895032
Committed: https://opendev.org/openstack/manila/commit/dba08c221c2d64089406b3c29f71c0a4837be94b
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit dba08c221c2d64089406b3c29f71c0a4837be94b
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry-picked from commit f6725f7c1460187637aa1758f1a8f06b8e268b56)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/manila/+/897032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/manila/+/897033

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/manila/+/897034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/manila/+/897035

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 16.1.0

This issue was fixed in the openstack/manila 16.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/manila/+/897032
Committed: https://opendev.org/openstack/manila/commit/3badc8633bab278ed9d2f1024ab4ae242b7306c2
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 3badc8633bab278ed9d2f1024ab4ae242b7306c2
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry-picked from commit f6725f7c1460187637aa1758f1a8f06b8e268b56)
    (cherry picked from commit dba08c221c2d64089406b3c29f71c0a4837be94b)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 15.3.0

This issue was fixed in the openstack/manila 15.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/manila/+/897033
Committed: https://opendev.org/openstack/manila/commit/f533bdb942ea67ee6c5373ff5efa8e10d711676f
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit f533bdb942ea67ee6c5373ff5efa8e10d711676f
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry-picked from commit f6725f7c1460187637aa1758f1a8f06b8e268b56)
    (cherry picked from commit dba08c221c2d64089406b3c29f71c0a4837be94b)
    (cherry picked from commit 3badc8633bab278ed9d2f1024ab4ae242b7306c2)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/manila/+/897034
Committed: https://opendev.org/openstack/manila/commit/312a3b4a7403e3b3e0d856e9a246554a7c8199c4
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 312a3b4a7403e3b3e0d856e9a246554a7c8199c4
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry-picked from commit f6725f7c1460187637aa1758f1a8f06b8e268b56)
    (cherry picked from commit dba08c221c2d64089406b3c29f71c0a4837be94b)
    (cherry picked from commit 3badc8633bab278ed9d2f1024ab4ae242b7306c2)
    (cherry picked from commit f533bdb942ea67ee6c5373ff5efa8e10d711676f)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/manila/+/897035
Committed: https://opendev.org/openstack/manila/commit/e7fab0ed8c9ba5ebda99f954daa1fdf74285fae9
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit e7fab0ed8c9ba5ebda99f954daa1fdf74285fae9
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Aug 10 15:28:31 2023 -0700

    Validate provider_location while managing snapshot

    Change-Id: Iec2ceb8a4d8519e5ed716e771dc17388ab5d4d7f
    Closes-Bug: #2031048
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry-picked from commit f6725f7c1460187637aa1758f1a8f06b8e268b56)
    (cherry picked from commit dba08c221c2d64089406b3c29f71c0a4837be94b)
    (cherry picked from commit 3badc8633bab278ed9d2f1024ab4ae242b7306c2)
    (cherry picked from commit f533bdb942ea67ee6c5373ff5efa8e10d711676f)
    (cherry picked from commit 312a3b4a7403e3b3e0d856e9a246554a7c8199c4)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 14.2.0

This issue was fixed in the openstack/manila 14.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila wallaby-eom

This issue was fixed in the openstack/manila wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila xena-eom

This issue was fixed in the openstack/manila xena-eom release.

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.