Project

General

Profile

Bug #7435

Cannot edit IP address in a host override

Added by Phillip Davis 9 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
03/27/2017
Due date:
% Done:

0%

Affected Version:
All
Affected Architecture:
All

Description

Forum: https://forum.pfsense.org/index.php?topic=127835.0

In either of DNS Forwarder or Resolver:
a) Add some host override, e.g. host 'x' domain 'example.com' IP address '192.168.11.22'
b) Save and Apply
c) Edit the host override. Change the IP address a bit, e.g. '192.168.11.33'
d) Press Save

Validation message is shown "This host/domain already exists."

Press "Save" again. This time it works! And the entry has the changes IP address.

Note: The forum entry talks about having 2 host overrides with the same host+domain, 1 for IPv4 and 1 for IPv6. But actually that complication is not necessary in order to get the bug.

It works OK in 2.3.4-development, so I guess is broken in 2.4 somehow.

It needs a bit of testing to find all the weird things that can go wrong.

Associated revisions

Revision d61ca1d9
Added by Phillip Davis 9 months ago

Redmine #7435 Fix edit problems due to POST id code

Revision ea846d78
Added by Phillip Davis 9 months ago

Redmine #7435 Fix edit problems due to POST id code

Revision 7abb61ef
Added by Phillip Davis 9 months ago

Redmine #7435 Fix edit problems due to POST id code

History

#2 Updated by Phillip Davis 9 months ago

PR with more stuff and a slightly different way to fix:
https://github.com/pfsense/pfsense/pull/3679

And this bug is a little more widespread/general than in he original report. There is a problem on some edit pages that the "id" is not remembered correctly to be POSTed back. So after pressing save, the "system" thinks it is a new entry. Either:
a) a duplicate entry is created (DNS Forwarder Domain Override Edit) or
b) the validation complains that there is some sort of data duplication problem (thinks the entry is already there, which it is!) and so refuses to save the edit - DNS Forwarder/Resolver Host Override Edit, Captice Portal Voucher Roll Edit.

These problems all are apparent in 2.4 master due to the changes related to $_GET, $_POST, $_REQUEST. But actually the problem has been latent in the code in 2.3.* so the fixes could (should?) be back-ported there also.

#3 Updated by Jim Pingle 9 months ago

  • Status changed from New to Feedback

Looks good. I managed to reproduce this late yesterday but left myself a note to check on it this morning again with fresh eyes. Guess I don't have to now :-)

Fix looks good, and I can't reproduce the problem with the patch applied. PR merged. Thanks!

#4 Updated by James Dekker 9 months ago

I am not able to reproduce this in DNS Resolver (unbound) on 2.4.0.b.20170401.1306.

#5 Updated by Jim Pingle 9 months ago

  • Status changed from Feedback to Resolved

#6 Updated by Jim Pingle 8 months ago

  • Target version changed from 2.4.0 to 2.3.4
  • Affected Version changed from 2.4 to All
  • Affected Architecture set to All

Also available in: Atom PDF