<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #1416: Registering with blank email can cause exception</title>
    <link>http://localhost/ticket/1416</link>
    <description>&lt;p&gt;
This might well be a bot, but not POSTing the email field should not cause an exception - it should be 400 and then the sysadmin doesn't get these nags.
&lt;/p&gt;
&lt;pre class="wiki"&gt;http://www.publicdata.eu/user/register
...
Module ckan.controllers.user:79 in register
&amp;lt;&amp;lt;              c.login = request.params.getone('login')
                   c.fullname = request.params.getone('fullname')
                   c.email = request.params.getone('email')
                   if not model.User.check_name_available(c.login):
                       h.flash_error(_("That username is not available."))
&amp;gt;&amp;gt;  c.email = request.params.getone('email')
Module webob.multidict:335 in getone
&amp;lt;&amp;lt;          values were found.
               """
               return self._decode_value(self.multi.getone(self._encode_key(key)))
           def mixed(self):
&amp;gt;&amp;gt;  return self._decode_value(self.multi.getone(self._encode_key(key)))
Module webob.multidict:99 in getone
&amp;lt;&amp;lt;          v = self.getall(key)
               if not v:
                   raise KeyError('Key not found: %r' % key)
               if len(v) &amp;gt; 1:
                   raise KeyError('Multiple values match %r: %r' % (key, v))
&amp;gt;&amp;gt;  raise KeyError('Key not found: %r' % key)
KeyError: "Key not found: 'email'"
&lt;/pre&gt;&lt;pre class="wiki"&gt;HTTP_USER_AGENT	'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MRA 4.3 (build 01218); .NET CLR 1.1.4322)'
webob._parsed_post_vars	(MultiDict([('login', 'ahusernames9'), ('fullname', 'ahusernames9'), ('password1', '******'), ('password2', '******'), ('s', 'Sign up')]), &amp;lt;FakeCGIBody at 0xb9d7c5ec viewing MultiDict([('lo...p')])&amp;gt;)
&lt;/pre&gt;</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/1416</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>rgrp</dc:creator>

      <pubDate>Fri, 28 Oct 2011 09:36:35 GMT</pubDate>
      <title>milestone changed</title>
      <link>http://localhost/ticket/1416#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/1416#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                changed from &lt;em&gt;ckan-current-sprint&lt;/em&gt; to &lt;em&gt;ckan-sprint-2011-11-07&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
In normal user submission this would result in errors reported and no 500. Happy to have this switch to 400 if you think this is a good idea.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Tue, 01 Nov 2011 13:18:27 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/1416#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/1416#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This seems to have been fixed in &lt;a class="closed ticket" href="http://localhost/ticket/1229" title="enhancement: Refactor all database code out of the controllers and into the logic layer (closed: fixed)"&gt;#1229&lt;/a&gt;. Added a test for this cset:5d6a3e50fe8f on default to demonstrate it displays a validation error, as rgrp suggests.
&lt;/p&gt;
&lt;p&gt;
Note, this ticket is about spammers missing some of the form fields, rather than any normal user usage, where the browser sends all the fields whether you fill them or not.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>