Skip to content

Commit a224262

Browse files
bpamiriclaude
andcommitted
fix: Use comment query data instead of session for child comment avatars
Child comments were incorrectly referencing session.email and session.username, which fails for non-logged-in visitors and shows the wrong user for logged-in ones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a64f977 commit a224262

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/views/web/BlogController/show.cfm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,18 +186,18 @@
186186
<div class="mt-4">
187187
<div class="d-flex align-items-start gap-3 position-relative" style="margin-left: 70px;">
188188
<div>
189-
<img src="#gravatarUrl(session.email, 96)#&d=404"
189+
<img src="#gravatarUrl(email, 96)#&d=404"
190190
class="rounded-circle"
191191
style="width:3rem; height:3rem;"
192192
onerror="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none');"
193193
alt="avatar">
194-
<div class="d-none d-flex align-items-center justify-content-center #getAvatarColorByLetter(ucase(left(listLast(session.username, ' '), 1)))# text-white rounded-circle fw-bold text-uppercase"
194+
<div class="d-none d-flex align-items-center justify-content-center #getAvatarColorByLetter(ucase(left(listLast(fullName, ' '), 1)))# text-white rounded-circle fw-bold text-uppercase"
195195
style="width:3rem;height:3rem;">
196-
#ucase(left(listLast(session.username, " "), 1))#
196+
#ucase(left(listLast(fullName, " "), 1))#
197197
</div>
198198
</div>
199199
<div class="p-3 rounded-4 flex-grow-1 bg-light">
200-
<h6 class="fs-16 fw-bold">#session.username#</h6>
200+
<h6 class="fs-16 fw-bold">#fullName#</h6>
201201

202202
<cfif findNoCase("```", content) OR findNoCase("##", content) OR findNoCase("**", content) OR findNoCase("__", content) OR findNoCase(">", content)>
203203
<p class="fs-14 fw-normal text-dark markdown-content">#encodeForHTML(content)#</p>

0 commit comments

Comments
 (0)