mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-24 01:28:30 +00:00
Fix parse file access user error (#714)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
parent
ed6a292061
commit
b1e7323647
@ -664,6 +664,7 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
|
|||||||
json_t *object;
|
json_t *object;
|
||||||
json_error_t jerror;
|
json_error_t jerror;
|
||||||
const char *user = NULL;
|
const char *user = NULL;
|
||||||
|
char *ret = NULL;
|
||||||
|
|
||||||
object = json_loadb (rsp_content, rsp_size, 0, &jerror);
|
object = json_loadb (rsp_content, rsp_size, 0, &jerror);
|
||||||
if (!object) {
|
if (!object) {
|
||||||
@ -676,11 +677,12 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
|
|||||||
seaf_warning ("Failed to find user in json when check file access in Seahub.\n");
|
seaf_warning ("Failed to find user in json when check file access in Seahub.\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
ret = g_strdup (user);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
json_decref (object);
|
json_decref (object);
|
||||||
|
|
||||||
return g_strdup (user);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user