BUG: Cannot edit GHC assignments with repositories #196011
Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Hi @kazakanan, Thanks for reporting this. The key clue here is the error message: CSRF (Cross-Site Request Forgery) tokens are security mechanisms used to ensure that the request to update your assignment is legitimately coming from your authenticated browser session. Because this error specifically triggers only when a repository is attached during an edit (but works perfectly fine during a fresh creation), it points to a platform-side bug in how GitHub Classroom handles token validation on that specific API endpoint. While we wait for the GitHub Engineering team to patch this routing issue, here are a few workarounds that have helped bypass similar token mismatches: 1. Force a Token Refresh (Clear Browser State)Sometimes, a stale or corrupted CSRF cookie is cached in your browser.
2. Check Browser Extensions / ShieldsAggressive privacy extensions, ad-blockers (like uBlock Origin), or built-in browser protections (like Brave Shields or Safari's Strict Tracking Protection) can sometimes strip out security headers or modify cross-site tokens. Try temporarily disabling them on this page and attempting the edit again. 3. The Re-creation WorkaroundAs you noted, creating a brand-new assignment with a repository works seamlessly. If you haven't distributed the assignment to students yet, the quickest path forward is to:
I've upvoted this thread for visibility so the GHC maintenance team can prioritize a hotfix for the assignment editing endpoint! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Other
Body
I was able to reuse assignments from the last offering but could not edit the assignment prefix (another BUG that I've been using a work around for since at least February). When I tried to save the assignment edit, I got booted to the log in screen with the message:
AlertCannot verify CSRF Token Authenticity
I hit the log in button and was immediately back in GHC.
I tried editing an assignment without changing the prefix info using the workaround and got the same error and was back on the log in screen.
Next, I tried creating a brand new assignment. I was able to do this both with and without an assignment repository.
I was able to edit the assignment without a repository but the assignment with a repo failed with the above error and redirect to the log in screen.
Beta Was this translation helpful? Give feedback.
All reactions