ispCP - Board - Support
Manual lines in DNS zone file - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Manual lines in DNS zone file (/thread-3727.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


RE: Manual lines in DNS zone file - BeNe - 06-22-2009 11:11 PM

Waiting for what ?

Greez BeNe


RE: Manual lines in DNS zone file - tango - 06-23-2009 02:26 AM

which it is embedded

ups http://www.isp-control.net/ispcp/changeset/1728

have not seen it


RE: Manual lines in DNS zone file - Foggy - 06-23-2009 07:19 AM

Quote:So we need this change in the trunk ?
In my opinion, yes I would like to see this change in trunk. If you even obtain to my last post...


RE: Manual lines in DNS zone file - Blondak - 06-26-2009 01:59 AM

(06-22-2009 06:09 PM)Foggy Wrote:  Ok, i came up to change line 497 from /var/www/ispcp/gui/client/edit_dns.php from
Code:
        $_dns = '';
to
Code:
        $_dns = $record_domain . '.';
This should fit my needs...

maybee, we can do somethink like this

line 30 from /var/www/ispcp/gui/themes/omega_origina/client/edit_dns.tpl from
Code:
<tr class="DNS DNS_A DNS_AAAA DNS_CNAME">
to
Code:
<tr class="DNS DNS_A DNS_AAAA DNS_CNAME DNS_MX">
and line 497 from /var/www/ispcp/gui/client/edit_dns.php from
Code:
        $_dns = '';
to
Code:
        $_dns = empty($_POST['dns_name'])?$record_domain.'.':$_POST['dns_name'];
which allows create own MX records for subdomains etc.. and if empty generates (domain.tld.)

regards Blondak


RE: Manual lines in DNS zone file - Foggy - 06-26-2009 02:51 PM

Of course, IMHO a good idea.
Shouldn't you use mysql_real_escape_string? Does ispCp this anywhere?
Otherwise I would recommend to use something like this:
Code:
$_dns = empty($_POST['dns_name']) ? $record_domain . '.' : mysql_real_escape_string($_POST['dns_name']);
But else, I would be happy if this code goes to the svn repo...


RE: Manual lines in DNS zone file - Blondak - 06-26-2009 07:28 PM

(06-26-2009 02:51 PM)Foggy Wrote:  Of course, IMHO a good idea.
Shouldn't you use mysql_real_escape_string? Does ispCp this anywhere?
Otherwise I would recommend to use something like this:
Code:
$_dns = empty($_POST['dns_name']) ? $record_domain . '.' : mysql_real_escape_string($_POST['dns_name']);
But else, I would be happy if this code goes to the svn repo...

I hope that mysql_real_escape_string is not nessesary, because ispcp uses PDO for SQL queries and its escapes inputs automatically.

EDIT: maybe better
Code:
$_dns = empty($_POST['dns_name']) ? $record_domain . '.' : encode_idna($_POST['dns_name'])

EDIT2: and the best Wink
Code:
--- edit_dns.php.backup    2008-08-12 08:06:12.000000000 +0200
+++ edit_dns.php    2009-06-26 12:19:38.000000000 +0200
@@ -363,6 +363,7 @@
    $_text = '';
    $_class = $_POST['class'];
    $_type = $_POST['type'];
+    $_POST['dns_name'] = encode_idna($_POST['dns_name']);

         list($dmn_id) = get_domain_default_props($sql, $_SESSION['user_id']);
    if ($add_mode){

Blondak


RE: Manual lines in DNS zone file - Foggy - 06-28-2009 05:47 PM

sounds good...

Quote:because ispcp uses PDO
Ok, I am don't going into IspCP that deep Wink


RE: Manual lines in DNS zone file - BeNe - 06-30-2009 03:51 PM

Can you Blondak provide a Patch with the changes ?
So we can get i quicker in the current trunk.

Thanks & Greez
BeNe


RE: Manual lines in DNS zone file - Blondak - 06-30-2009 10:54 PM

(06-30-2009 03:51 PM)BeNe Wrote:  Can you Blondak provide a Patch with the changes ?
So we can get i quicker in the current trunk.

Thanks & Greez
BeNe

i have no time to test it, i hope it will work, can anyone test it?
patch against current trunk


RE: Manual lines in DNS zone file - Foggy - 07-02-2009 04:53 PM

Quote:Can you Blondak provide a Patch with the changes ?
I think he has done the job in post 136 Wink

@Blondak, i tested it and for me, it works well...