New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seen texts are broken if game is recompiled from a different directory #1628

Closed
Beuc opened this Issue Nov 9, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@Beuc
Contributor

Beuc commented Nov 9, 2018

Hi,

AFAICS the "seen texts" are stored in savegames using unique identifiers, that contains the fullpath for each script that contain said texts.
However this full path appears to come from the release's .rpyc files, which reference the full original path from the developer computer.
(Note: this is a minor information leak vulnerability, e.g. it typically contains the developer's local login name.)

If the developer renames the directory, removes the .rpyc files, and re-releases the game, people updating to that new (identical) version will have their "seen texts" reset, and will have to manually skip them one by one.

It would make sense to store the path from the "game/" folder downwards only, to avoid both breaking seen texts and leaking the developer full path.

@renpytom

This comment has been minimized.

Member

renpytom commented Nov 9, 2018

Well, deleting the .rpyc will break the saves entirely. So that's not really a problem.

That being said, it shouldn't store the full path, so I'll look into eliding that going forwards.

@Beuc

This comment has been minimized.

Contributor

Beuc commented Nov 9, 2018

Well, deleting the .rpyc will break the saves entirely. So that's not really a problem.

Ouch. I missed that part.
One had better copy back the last release's .rpyc files before making a bugfix release then.
I expected that 2 developers could independently compile the same .rpy files and still produce a compatible game.

@renpytom

This comment has been minimized.

Member

renpytom commented Nov 9, 2018

No, that won't work.

The reason is the .rpyc files include information in them that helps Ren'Py find the location of a line after a load into a changed game. The alternative would be to use line numbers or something similar, but that would be a huge pain to work with.

@renpytom

This comment has been minimized.

Member

renpytom commented Nov 9, 2018

b159a34 elides the filenames used as part of statement names.

@renpytom renpytom closed this Nov 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment