mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
SECURITY: don't grant same privileges to user_api and api access
User API is no longer gets bypasses that standard API gets. Only bypasses are CSRF and XHR requirements.
This commit is contained in:
@@ -467,7 +467,7 @@ class PostsController < ApplicationController
|
||||
json_obj = json_obj[:post]
|
||||
end
|
||||
|
||||
if !success && GlobalSetting.try(:verbose_api_logging) && is_api?
|
||||
if !success && GlobalSetting.try(:verbose_api_logging) && (is_api? || is_user_api?)
|
||||
Rails.logger.error "Error creating post via API:\n\n#{json_obj.inspect}"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user