You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@answer.apache.org by "hgaol (via GitHub)" <gi...@apache.org> on 2026/06/09 15:37:58 UTC
[PR] fix: accept answer fails when short links enabled (#1541) [answer]
hgaol opened a new pull request, #1544:
URL: https://github.com/apache/answer/pull/1544
Close #1541
The ownership check added to AcceptAnswer compared the answer's QuestionID against the request's QuestionID directly. When short links are enabled, answerRepo.GetByID re-encodes QuestionID to its short form while the controller de-shorts req.QuestionID to its long form, so the two encodings of the same question never matched and every accept returned "Answer do not found". Normalize both ids via uid.DeShortID before comparing, preserving the privilege-escalation guard for answers that truly belong to another question.
Validated in local environment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] fix: accept answer fails when short links enabled (#1541) [answer]
Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars merged PR #1544:
URL: https://github.com/apache/answer/pull/1544
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org