Skip to content

Commit

Permalink
fix zone template's @allow_transfer check
Browse files Browse the repository at this point in the history
the zone template was including empty allow_transfer {} blocks because
a 0-length array was still being treated as "true".  this PR changes
the check to verify that @allow_transfer is an array and has >0 size.
  • Loading branch information
Johnson Earls committed May 29, 2015
1 parent 80fc453 commit c6fe9e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/zone.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type <%= @zone_type %>;
<% if @zone_type == 'slave' -%>
masters { <%= @slave_masters %>;};
<% elsif @zone_type == 'master' -%>
<% if @allow_transfer -%>
<% if @allow_transfer.is_a?(Array) and @allow_transfer.size != 0 -%>
allow-transfer {
<% @allow_transfer.each do |ip| -%>
<%= ip %>;
Expand Down

0 comments on commit c6fe9e7

Please sign in to comment.