{"id":52,"date":"2025-08-11T13:14:15","date_gmt":"2025-08-11T13:14:15","guid":{"rendered":"https:\/\/blogs.scummvm.org\/shivangnagta\/?p=52"},"modified":"2025-08-11T13:18:23","modified_gmt":"2025-08-11T13:18:23","slug":"week-10","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/shivangnagta\/2025\/08\/11\/week-10\/","title":{"rendered":"Week 10"},"content":{"rendered":"<p>Welcome to this week&#8217;s blog. This week, my work focused on enhancing API security, adding github authentication, refining project structure, and introducing a faster Python package manager (UV).<\/p>\n<h6 data-start=\"402\" data-end=\"433\">API Security Improvements<\/h6>\n<p data-start=\"434\" data-end=\"665\">I implemented some checks on the validation endpoint, which processes the user game files data sent from the ScummVM application. These checks are designed to prevent any kind of brute-force attempts &#8211;<\/p>\n<figure id=\"attachment_53\" aria-describedby=\"caption-attachment-53\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-53 size-medium\" src=\"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.30.55-PM-300x180.png\" alt=\"\" width=\"300\" height=\"180\" srcset=\"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.30.55-PM-300x180.png 300w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.30.55-PM-768x462.png 768w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.30.55-PM.png 778w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-53\" class=\"wp-caption-text\">Checks on validation endpoint<\/figcaption><\/figure>\n<p>On top of that, I introduced rate limiting using Flask-Limiter. Currently, the validation endpoint allows a maximum of 3 requests per minute per user.<\/p>\n<h6 data-start=\"856\" data-end=\"894\">GitHub OAuth &amp; Role-Based Access<\/h6>\n<p data-start=\"895\" data-end=\"990\">GitHub OAuth authentication is now in place, introducing a three-level role-based system. Though, I have tested it with my own dummy organisation, the integration with ScummVM is remaining:<\/p>\n<ul data-start=\"991\" data-end=\"1195\">\n<li data-start=\"991\" data-end=\"1059\">\n<p data-start=\"993\" data-end=\"1059\">Admin \u2013 Full access, plus the ability to clear the database.<\/p>\n<\/li>\n<li data-start=\"1060\" data-end=\"1133\">\n<p data-start=\"1062\" data-end=\"1133\">Moderators \u2013 Same permissions as Admin, except database clearing.<\/p>\n<\/li>\n<li data-start=\"1134\" data-end=\"1195\">\n<p data-start=\"1136\" data-end=\"1195\">Read-Only \u2013 Logged-in users with viewing rights only.<\/p>\n<\/li>\n<\/ul>\n<figure id=\"attachment_54\" aria-describedby=\"caption-attachment-54\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-54 size-medium\" src=\"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-300x241.png\" alt=\"\" width=\"300\" height=\"241\" srcset=\"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-300x241.png 300w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-1024x822.png 1024w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-768x616.png 768w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-1536x1233.png 1536w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM-1200x963.png 1200w, https:\/\/blogs.scummvm.org\/shivangnagta\/wp-content\/uploads\/sites\/81\/2025\/08\/Screenshot-2025-08-11-at-5.50.43-PM.png 1944w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-54\" class=\"wp-caption-text\">Github OAuth<\/figcaption><\/figure>\n<h6 data-start=\"1274\" data-end=\"1318\">Project Restructuring &amp; UV Integration<\/h6>\n<p data-start=\"1319\" data-end=\"1439\">As suggested by my mentor Rvanlaar, I restructured the project into a Python module, making the import logic cleaner and improving overall modularity. I also added UV, a high-performance Python package and project manager, offering faster dependency handling compared to pip.<\/p>\n<h6 data-start=\"1581\" data-end=\"1613\">Other Fixes &amp; Improvements<\/h6>\n<ul data-start=\"1614\" data-end=\"1802\">\n<li data-start=\"1614\" data-end=\"1711\">\n<p data-start=\"1616\" data-end=\"1711\">Updated the apache config file to use the Python virtual environment instead of the global installation.<\/p>\n<\/li>\n<li data-start=\"1614\" data-end=\"1711\">\n<p data-start=\"1616\" data-end=\"1711\">Correctly decode MacBinary filenames from headers using MacRoman instead of UTF-8.<\/p>\n<\/li>\n<li data-start=\"1614\" data-end=\"1711\">\n<p data-start=\"1616\" data-end=\"1711\">Improved error handling for the scan utlility.<\/p>\n<\/li>\n<li data-start=\"1712\" data-end=\"1802\">Use one of size or size-rd for filtering filesets for scan.dat in case of macfiles instead of both simultaneously.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to this week&#8217;s blog. This week, my work focused on enhancing API security, adding github authentication, refining project structure, and introducing a faster Python package manager (UV). API Security Improvements I implemented some checks on the validation endpoint, which processes the user game files data sent from the ScummVM application. These checks are designed [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":3,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/posts\/52\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/shivangnagta\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}