We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8b154118 authored by millette's avatar millette

make sure passed profile_id is valid in Notice::saveNew

darcs-hash:20081210181123-099f7-b13ae11d136512655fc5ba4bb314c80256244593.gz
parent 9553072e
......@@ -92,6 +92,10 @@ class Notice extends Memcached_DataObject
}
static function saveNew($profile_id, $content, $source=NULL, $is_local=1, $reply_to=NULL, $uri=NULL) {
if (!Profile::staticGet($profile_id)) {
common_log(LOG_ERR, 'Problem saving notice. Unknown user.');
return _('Problem saving notice. Unknown user.');
}
if (!Notice::checkEditThrottle($profile_id)) {
common_log(LOG_WARNING, 'Excessive posting by profile #' . $profile_id . '; throttled.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment