Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit 3c51ca95 authored by yodzeb's avatar yodzeb Committed by GitHub
Browse files

Update Nat.php

Patch method > src and dst missed their json encoding.
parent d917a5f8
Branches
No related tags found
No related merge requests found
...@@ -227,6 +227,11 @@ class Nat_controller extends Common_api_functions { ...@@ -227,6 +227,11 @@ class Nat_controller extends Common_api_functions {
$values = $this->validate_keys (); $values = $this->validate_keys ();
# validate input format # validate input format
$this->validate_nat_edit(); $this->validate_nat_edit();
foreach (array("src","dst") as $k) {
if ( array_key_exists($k, $values) ) {
$values[$k] = json_encode($values[$k]);
}
}
if (!$this->Admin->object_modify ("nat", "edit", "id", $values)) { if (!$this->Admin->object_modify ("nat", "edit", "id", $values)) {
$this->Response->throw_exception(500, "NAT modification failed"); $this->Response->throw_exception(500, "NAT modification failed");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment