So Code.org Only Does Featured Projects Now?
ackvonhuelioLvl 41
[WUT] Adam
huh i guess i'll have to try that out...
wait what's stopping someone from getting rid of the "id" property
bad idea ahead ... or changing the thumbnail of a featured project to nsfw stuff 😱...
[WUT] AdamLvl 13
- Windows
ackvonhuelio You can't change the id
property. It automatically resets it to the channel ID.
ackvonhuelioLvl 41
[WUT] Adam
what about the bad idea
DragonFireGamesLvl 11
well boys, it was fun while it lasted
ackvonhuelioLvl 41
DragonFireGames
nuh uh
DragonFireGamesLvl 11
ackvonhuelio guess i gotta go to khan now
DragonFireGamesLvl 11
[WUT] Adam Didn't you figure it out once and then proceed to spam the public project list so bad you were called to the office at school to talk about it.
[WUT] AdamLvl 13
- iPhone
DragonFireGames No, that was figuring out how to report projects programmatically and then doing so on every public project on the site.
peptobeptoLvl 2
- Linux
I win :D
Binary_CoderLvl 2
[WUT] Adam Yep, that's exactly what I was thinking. If publish requests can be hacked then the frozen
property should be changeable as well. And if you can edit a featured project, that means chats are actually still possible. Crazy thing is that I had been using the API a few days ago and noticed the new frozen
property, but didn't think anything of it.
ackvonhuelio Owokoyo explained that thumbnails can be hacked (part 4), but you need an authorization token first. Once that's figured out, both the thumbnail and frozen
property should be changeable.
[WUT] AdamLvl 13
- Edited
- Windows
Binary_Coder It's also possible to just use another project's thumbnail as the thumbnail, and then setting the channel ID in thumbnailUrl
to that project. Here's the easiest way to accomplish that:
- Create a new Game Lab project.
- Add the image you want as the thumbnail as a 400x400 sprite.
- Draw the sprite on the screen, and then click the Share button. If you mess up or want to change it, reload the page, make any alterations you want, and then click the Share button while it's running.
- Copy the channel ID, and then GET the /v3/channels object for the project you want to have that thumbnail.
- Set the channel ID in
thumbnailURL
to the channel ID of the thumbnail project, and then POST it to the server. - Any time afterwards that you edit that project's code, repeat steps 4-5.
The "authorization" is really just being logged into the code.org account that owns the project.
Binary_CoderLvl 2
[WUT] Adam Okay, that's good to know. Never had much success with POST requests before but I'll give it another shot.
Also, does this mean that you could change the data in https://studio.code.org/api/v1/users/current to give yourself permission to add featured projects?
[WUT] AdamLvl 13
- Edited
- Windows
Binary_Coder Attempting to send a POST request to https://studio.code.org/api/v1/users/current returns 404. I couldn't figure out what makes a featured project featured--it's probably just an array on their end.
ItsDannyBruhLvl 5
CDO fucked up so bad bro.. yeah im taking acks word for it and moving to ka