"<h2><B>User jobs</B></h2>\r\n"
"User subject: %s<p>"
"<ul>%s</ul>"
- "\t</body>\r\n</html>",ctx->peerName,pomB);
+ "\t</body>\r\n</html>",ctx->peerName?ctx->peerName: "<anonymous>",pomB);
free(pomB);
*message = pomA;
!(job_where = jc_to_head_where(ctx, job_conditions, &i)) )
goto cleanup;
- peerid = strdup(strmd5(ctx->peerName,NULL));
+ if (ctx->peerName) peerid = strdup(strmd5(ctx->peerName,NULL));
can_peername = edg_wll_gss_normalize_subj(ctx->peerName, 0);
- can_peerid = strdup(strmd5(can_peername,NULL));
+ if (can_peername) can_peerid = strdup(strmd5(can_peername,NULL));
/* XXX: similar query in srv_purge.c ! They has to match due to common
* convert_event_head() called on the result
edg_wll_ResetError(ctx);
+ if (!ctx->peerName) {
+ return edg_wll_SetError(ctx,EPERM, "user not authenticated (edg_wll_UserJobs)");
+ }
can_peername = edg_wll_gss_normalize_subj(ctx->peerName, 0);
userid = strmd5(can_peername,NULL);
free(can_peername);