Issue as the title stated.
For any commonwealthes, creating a new colony using a charter code will cause the new colony relocated to their home civilization's AI commonwealth, after being indicated as ' colony of Undefined '.
I think it is client side bug:
With Fiddler: POST www.my-colony.com/api.php HTTP/1.1 f=3&g=1&c=XXXXXXX&relcd=91
{"colonyid":"935XXX","colonyname":"Mars","civilization":"United Earth","race":"Human","maptype":"Red Planet"}
So at first it resolves the parent(XXX is a masking done here) Thereafter when registers:
POST www.my-colony.com/api.php HTTP/1.1
f=32&g=1&n=Newname&p=undefined&relcd=91
{"id":0,"charter":"VZKOACbR","guid":"10E8A8BE-4E45-75C8-8E42-951366CEE0F5"}
So probably there is a workaround if I ask fiddler to substitute undefined with my charter code.
What worries me a bit is that there is absolutely no authentication on the corresponding API calls.
Thanks for the debugging. You are right that there is no authentication on API function 32. I can probably change that now, as it was required to be that way before because registering a colony online originally did not require an Ape Apps Account at all, and so the functions of adding a new colony to the database and registering a colony to an account were implemented separately, to accommodate all of the colonies that existed before Ape Apps Accounts were implemented. I will need to replace this with a new authenticated function for the next update.
Owner of Ape Apps, LLC
HEY DON’T COPY & PASTE MINE WITHOUT QUOTING FUNCTION
https://www.ape-apps.com/viewpage.php?p=31538
But thanks for getting this problem noticed by bast for debugging.
You can help by EXPANDING IT.