diff options
author | Mahdi Mokhtari <mokhi64@gmail.com> | 2016-01-05 15:06:16 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-01-05 15:06:16 +0100 |
commit | 6e6093a1ea2e44df70c1689e454a24c71cc33e54 (patch) | |
tree | 4910fe8c9c971a5698c1bee195834293d827c06b | |
parent | f7293523ca164bc5726c98be8fbdfef74d952fe1 (diff) | |
download | bugs-6e6093a1ea2e44df70c1689e454a24c71cc33e54.tar bugs-6e6093a1ea2e44df70c1689e454a24c71cc33e54.tar.gz bugs-6e6093a1ea2e44df70c1689e454a24c71cc33e54.tar.bz2 bugs-6e6093a1ea2e44df70c1689e454a24c71cc33e54.tar.xz bugs-6e6093a1ea2e44df70c1689e454a24c71cc33e54.zip |
Bug 1235270: Set submitter_id before calling _check_data()
r=LpSolit a=dkl
-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 932fb6b17..33183797b 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -865,6 +865,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); @@ -872,7 +874,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; } |