diff options
author | Mahdi Mokhtari <mokhi64@gmail.com> | 2016-01-05 15:04:39 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-01-05 15:04:39 +0100 |
commit | 66e373d115707a31506abb62b95425555e94435b (patch) | |
tree | 9e45c6732fb0d0cee344cc19b3690b72f0373535 | |
parent | 7829cc8281fabe7809b85d772a7495ba1920dfed (diff) | |
download | bugzilla-66e373d115707a31506abb62b95425555e94435b.tar.gz bugzilla-66e373d115707a31506abb62b95425555e94435b.tar.xz |
Bug 1235270: Set submitter_id before calling _check_data()
r=LpSolit
-rw-r--r-- | Bugzilla/Attachment.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index ed43cbe94..1f2bddda5 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -903,6 +903,8 @@ sub create { sub run_create_validators { my ($class, $params) = @_; + $params->{submitter_id} = Bugzilla->user->id || ThrowUserError('invalid_user'); + # Let's validate the attachment content first as it may # alter some other attachment attributes. $params->{data} = $class->_check_data($params); @@ -910,7 +912,6 @@ sub run_create_validators { $params->{creation_ts} ||= Bugzilla->dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)'); $params->{modification_time} = $params->{creation_ts}; - $params->{submitter_id} = Bugzilla->user->id || ThrowUserError('invalid_user'); return $params; } |