Current time: 11-25-2024, 09:54 AM Hello There, Guest! (LoginRegister)


Post Reply 
Manual lines in DNS zone file
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #131
RE: Manual lines in DNS zone file
Waiting for what ?

Greez BeNe
06-22-2009 11:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
tango Offline
Member
***

Posts: 461
Joined: Jun 2007
Reputation: 0
Post: #132
RE: Manual lines in DNS zone file
which it is embedded

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

have not seen it
06-23-2009 02:26 AM
Find all posts by this user Quote this message in a reply
Foggy Offline
Junior Member
*

Posts: 52
Joined: Feb 2009
Reputation: 0
Post: #133
RE: Manual lines in DNS zone file
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...
06-23-2009 07:19 AM
Find all posts by this user Quote this message in a reply
Blondak Offline
Junior Member
*****
Dev Team

Posts: 84
Joined: May 2008
Reputation: 5
Post: #134
RE: Manual lines in DNS zone file
(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
(This post was last modified: 06-26-2009 02:03 AM by Blondak.)
06-26-2009 01:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Foggy Offline
Junior Member
*

Posts: 52
Joined: Feb 2009
Reputation: 0
Post: #135
RE: Manual lines in DNS zone file
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...
06-26-2009 02:51 PM
Find all posts by this user Quote this message in a reply
Blondak Offline
Junior Member
*****
Dev Team

Posts: 84
Joined: May 2008
Reputation: 5
Post: #136
RE: Manual lines in DNS zone file
(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
(This post was last modified: 06-26-2009 08:23 PM by Blondak.)
06-26-2009 07:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Foggy Offline
Junior Member
*

Posts: 52
Joined: Feb 2009
Reputation: 0
Post: #137
RE: Manual lines in DNS zone file
sounds good...

Quote:because ispcp uses PDO
Ok, I am don't going into IspCP that deep Wink
06-28-2009 05:47 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #138
RE: Manual lines in DNS zone file
Can you Blondak provide a Patch with the changes ?
So we can get i quicker in the current trunk.

Thanks & Greez
BeNe
06-30-2009 03:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Blondak Offline
Junior Member
*****
Dev Team

Posts: 84
Joined: May 2008
Reputation: 5
Post: #139
RE: Manual lines in DNS zone file
(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


Attached File(s)
.patch  basic-dns-support-MX-subdomains.patch (Size: 1.58 KB / Downloads: 16)
06-30-2009 10:54 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Foggy Offline
Junior Member
*

Posts: 52
Joined: Feb 2009
Reputation: 0
Post: #140
RE: Manual lines in DNS zone file
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...
07-02-2009 04:53 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 23 Guest(s)