diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-01-17 09:58:04 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-01-17 09:58:04 -0800 |
commit | d376dac11c8008c59dc29d6515543ac23f856a0e (patch) | |
tree | 1638b98cded1184ff3402dd0c31a3a034b0a5f48 /controllers/controllers.php | |
parent | 0e8ee9973a550a3ab0a2069d9a12b683651b7d9b (diff) |
allow only mp-syndicate-to and syndicate-to
Diffstat (limited to 'controllers/controllers.php')
-rw-r--r-- | controllers/controllers.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php index 3f95147..4b19879 100644 --- a/controllers/controllers.php +++ b/controllers/controllers.php @@ -324,8 +324,10 @@ $app->post('/settings/save', function() use($app) { if(array_key_exists('slug_field', $params) && $params['slug_field']) $user->micropub_slug_field = $params['slug_field']; - if(array_key_exists('syndicate_field', $params) && $params['syndicate_field']) - $user->micropub_syndicate_field = $params['syndicate_field']; + if(array_key_exists('syndicate_field', $params) && $params['syndicate_field']) { + if(in_array($params['syndicate_field'], ['syndicate-to','mp-syndicate-to'])) + $user->micropub_syndicate_field = $params['syndicate_field']; + } $user->save(); $app->response()['Content-type'] = 'application/json'; |