[3685] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [barnowl] Perl logging (#54)

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Thu Jan 2 20:51:06 2014

Date: Thu, 02 Jan 2014 17:51:04 -0800
From: Anders Kaseorg <notifications@github.com>
Reply-To: barnowl/barnowl <reply+p-8628459-e8d2c89c65bd053dfd4f05615d35818e54b567b8-4475081@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
In-Reply-To: <barnowl/barnowl/pull/54@github.com>


----==_mimepart_52c617881d0c8_7f2bf83cfc2332d2
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

> @@ -22,6 +22,12 @@ sub principal_realm {
>      return $realm;
>  }
>  
> +sub casefold_principal {
> +    my $principal = shift;
> +    my ($user, $realm) = split(/@/, $principal);

(Re-sending lost comments:)

>> Do you know that principals must have exactly one `@`?
>
> No, but if it's wrong, then the pre-existing `principal_realm` function right above this one is also wrong.

But `principal_realm` is only called on the sender of incoming messages, which is more likely to have exactly one `@` than strings parsed from the CC line in a zephyr.

---
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/54/files#r8628459
----==_mimepart_52c617881d0c8_7f2bf83cfc2332d2
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>In perl/lib/BarnOwl/Message/Zephyr.pm:</p>
<pre style='color:#555'>&gt; @@ -22,6 +22,12 @@ sub principal_realm {
&gt;      return $realm;
&gt;  }
&gt;  
&gt; +sub casefold_principal {
&gt; +    my $principal = shift;
&gt; +    my ($user, $realm) = split(/@/, $principal);
</pre>
<p>(Re-sending lost comments:)</p>

<blockquote>
<blockquote>
<p>Do you know that principals must have exactly one <code>@</code>?</p>
</blockquote>

<p>No, but if it's wrong, then the pre-existing <code>principal_realm</code> function right above this one is also wrong.</p>
</blockquote>

<p>But <code>principal_realm</code> is only called on the sender of incoming messages, which is more likely to have exactly one <code>@</code> than strings parsed from the CC line in a zephyr.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href='https://github.com/barnowl/barnowl/pull/54/files#r8628459'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/4475081__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNDI0NjY2MywiZGF0YSI6eyJpZCI6MjI3OTE3NzN9fQ==--eade39a60a18ee9bc74db066c270ab51b5eae6f7.gif' height='1' width='1'></p>
----==_mimepart_52c617881d0c8_7f2bf83cfc2332d2--

home help back first fref pref prev next nref lref last post