lynxis / pdns-gui

Automatically exported from code.google.com/p/pdns-gui
0 stars 0 forks source link

Unable to edit domain templates #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install pdns-gui 0.3.3
2. try to edit the zone templates. :)

What is the expected output? What do you see instead?

See Attachment.

What version of the product are you using? On what operating system?
- PowerDNS GUI: 0.3.3
- Server: Linux / Debian Lenny 5.0
- Client: Windows 7 + Firefox 3.6.3

Please provide any additional information below.

I'm unable to edit or add the zone tempaltes. I _always_ get the error
message, even if everythings seems to be correct.

  "Row 1: invalid name (only letters, digits and hyphen allowed).Template:
undefined"

Original issue reported on code.google.com by kwhark@gmail.com on 7 May 2010 at 7:30

Attachments:

GoogleCodeExporter commented 9 years ago
Another screenshot... :)

Original comment by kwhark@gmail.com on 7 May 2010 at 7:32

Attachments:

GoogleCodeExporter commented 9 years ago
I can confirm this same error

Template: undefined
Row 1: invalid name (only letters, digits and hyphen allowed).

Original comment by xeross.theelitist.net on 12 Jun 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Confirmed, would like to see a fix.

Original comment by goo...@jorijn.com on 16 Jun 2010 at 1:51

GoogleCodeExporter commented 9 years ago
Problem is caused by the validation function. You can't seem to use the 
%DOMAIN% tag 
The filter should allow for % characters as well.

Original comment by xander.b...@gmail.com on 21 Jun 2010 at 3:05

GoogleCodeExporter commented 9 years ago
Fix (bit dirty):
change rexexp on line 270 to match:
/^([a-z]{1}[a-z0-9\.\-]+[a-z0-9]{1})?(%DOMAIN%)?$/

In theory this will also allow an empty record, although the GUI will not allow 
you to.

or (even more ditry):
edit line 273 to return true instead of false:
return true;

Original comment by jorisc...@gmail.com on 9 Aug 2010 at 10:51

GoogleCodeExporter commented 9 years ago
More info: this has to be changed in file:
pdns-gui.0.3.3/apps/frontend/modules/template/actions/actions.class.php

Original comment by jorisc...@gmail.com on 9 Aug 2010 at 10:52

GoogleCodeExporter commented 9 years ago
I use 

'/^([a-z]{1}[a-z0-9\.\-\*]+[a-z0-9]{1})|([a-z0-9\.\-\*]%DOMAIN%?)|%DOMAIN%$/'

here, this wouldn't allow empty Name. Also catchall "*" is allowed...

Original comment by marno2...@gmail.com on 4 Mar 2011 at 9:45