mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 06:25:04 +00:00
Added more webfinger checks, just to be sure.
This commit is contained in:
parent
7f6a793146
commit
cc535e9958
2 changed files with 4 additions and 3 deletions
|
@ -616,7 +616,7 @@ xs_str *process_tags(snac *snac, const char *content, xs_list **tag)
|
|||
|
||||
status = webfinger_request(wuid, &actor, &uid);
|
||||
|
||||
if (valid_status(status)) {
|
||||
if (valid_status(status) && actor && uid) {
|
||||
xs *d = xs_dict_new();
|
||||
xs *n = xs_fmt("@%s", uid);
|
||||
|
||||
|
@ -1207,7 +1207,8 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
|
|||
xs *t_href = NULL;
|
||||
xs *t_name = NULL;
|
||||
|
||||
if (!xs_is_null(a) && valid_status(webfinger_request(a, &t_href, &t_name))) {
|
||||
if (!xs_is_null(a) && valid_status(webfinger_request(a, &t_href, &t_name)
|
||||
&& t_href && t_name)) {
|
||||
xs *t = xs_dict_new();
|
||||
|
||||
t = xs_dict_append(t, "type", "Mention");
|
||||
|
|
|
@ -1941,7 +1941,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
|||
char *actor = NULL;
|
||||
char *user = NULL;
|
||||
|
||||
if (valid_status(webfinger_request(q, &actor, &user))) {
|
||||
if (valid_status(webfinger_request(q, &actor, &user) && actor)) {
|
||||
xs *actor_o = NULL;
|
||||
|
||||
if (valid_status(actor_request(&snac1, actor, &actor_o))) {
|
||||
|
|
Loading…
Reference in a new issue