commit 0ede5e8

default  ·  2024-02-16 05:06:12 +0000 UTC
parent 2da394a
Fixed crash in verify_links().
1 files changed,  +4, -3
+4, -3
 1@@ -447,7 +447,7 @@ void verify_links(snac *user)
 2         char *ll;
 3         int vfied = 0;
 4 
 5-        while (xs_list_iter(&lp, &ll)) {
 6+        while (!vfied && xs_list_iter(&lp, &ll)) {
 7             /* extract href and rel */
 8             xs *r = xs_regex_select(ll, "(href|rel) *= *(\"[^\"]*\"|'[^']*')");
 9 
10@@ -493,11 +493,12 @@ void verify_links(snac *user)
11                     /* got it! */
12                     xs *verified_at = xs_str_utctime(0, ISO_DATE_SPEC);
13 
14+                    if (user->links == NULL)
15+                        user->links = xs_dict_new();
16+
17                     user->links = xs_dict_set(user->links, v, verified_at);
18 
19                     vfied = 1;
20-
21-                    break;
22                 }
23                 else
24                     snac_debug(user, 1,