Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.78.2.18 -r1.78.2.19 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 20 Aug 2016 06:58:14 -0000 1.78.2.18 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 29 Aug 2016 11:42:24 -0000 1.78.2.19 @@ -588,8 +588,8 @@ } ad_proc -public ad_get_login_url { - -authority_id - -username + {-authority_id ""} + {-username ""} -return:boolean } { @@ -615,17 +615,19 @@ set url / } - set UseHostnameDomainforReg [parameter::get -package_id [apm_package_id_from_key acs-tcl] \ - -parameter UseHostnameDomainforReg -default 0] + set UseHostnameDomainforReg [parameter::get \ + -package_id [apm_package_id_from_key acs-tcl] \ + -parameter UseHostnameDomainforReg \ + -default 0] if { $UseHostnameDomainforReg } { # get config.tcl's hostname set config_hostname [ns_config [ns_driversection] hostname] set current_location [util_current_location] # if current domain and hostdomain are different (and UseHostnameDomain), revise url - if { ![string match -nocase "*${config_hostname}*" $current_location] } { + if { ![string match -nocase "*${config_hostname}*" $current_location] } { if { [string range $url 0 0] eq "/" } { # Make the url fully qualified if { [security::secure_conn_p] } { @@ -665,11 +667,11 @@ append url "register/" set export_vars [list] - if { [info exists authority_id] && $authority_id ne "" } { + if { $authority_id ne "" } { lappend export_vars authority_id } - if { ([info exists username] && $username ne "") } { + if { $username ne "" } { lappend export_vars username } @@ -1912,7 +1914,8 @@ ns_log Warning "host header field contains invalid characters: $host" return "" } - set result [db_list host_header_field_mapped {select 1 from host_node_map where host = :host}] + set result [db_list host_header_field_mapped {select 1 from host_node_map where host = :hostName}] + ns_log notice "checking entry <$hostName> from host_node_map -> $result" if {$result == 1} { # # port is ignored