You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/08/12 01:19:14 UTC

[whimsy] branch master updated: validate ids

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 8700731  validate ids
8700731 is described below

commit 87007314234d1122b4c43ae46fd83a0d698faae7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Aug 11 21:19:05 2017 -0400

    validate ids
---
 www/roster/views/actions/ppmc.json.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/actions/ppmc.json.rb b/www/roster/views/actions/ppmc.json.rb
index e9c845e..4ab37a4 100644
--- a/www/roster/views/actions/ppmc.json.rb
+++ b/www/roster/views/actions/ppmc.json.rb
@@ -1,5 +1,8 @@
 if env.password
-  people = @ids.split(',').map {|id| ASF::Person.find(id)}
+  people = @ids.split(',').map {|id| ASF::Person[id]}
+
+  # validate ids
+  raise ArgumentError.new("ids=#{@ids}") if people.any? {|person| person.nil?}
 
   # if target is ONLY icommit, use incubator in the email message, etc.
   # Otherwise, use the project (podling).

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].