Mercurial > pub > Impl
comparison Lib/IMPL/Web/Handler/SecureCookie.pm @ 393:69a1f1508696
minor security refactoring
author | cin |
---|---|
date | Fri, 14 Feb 2014 16:41:12 +0400 |
parents | d5c8b955bf8d |
children |
comparison
equal
deleted
inserted
replaced
392:54b1dc9e808a | 393:69a1f1508696 |
---|---|
90 die $e if $e; | 90 die $e if $e; |
91 | 91 |
92 die OperationException->new("A HttpResponse instance is expected") | 92 die OperationException->new("A HttpResponse instance is expected") |
93 unless ref $httpResponse && eval { $httpResponse->isa(HttpResponse) }; | 93 unless ref $httpResponse && eval { $httpResponse->isa(HttpResponse) }; |
94 | 94 |
95 return $this->WriteResponse($httpResponse); | 95 return $this->_WriteResponse($httpResponse); |
96 } | 96 } |
97 | 97 |
98 sub InitSession { | 98 sub InitSession { |
99 my ($this,$user,$roles,$auth,$challenge) = @_; | 99 my ($this,$user,$roles,$auth,$challenge) = @_; |
100 | 100 |
141 sdata => undef | 141 sdata => undef |
142 }) | 142 }) |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 sub WriteResponse { | 146 sub _WriteResponse { |
147 my ($this,$response) = @_; | 147 my ($this,$response) = @_; |
148 | 148 |
149 if (my $data = $this->_cookies) { | 149 if (my $data = $this->_cookies) { |
150 | 150 |
151 my $sign = $data->{sid} && md5_hex( | 151 my $sign = $data->{sid} && md5_hex( |