Skip to content
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

Obfuscation issue with "qualifiedTypename" #529

Closed
Monabr opened this issue Mar 29, 2024 · 4 comments
Closed

Obfuscation issue with "qualifiedTypename" #529

Monabr opened this issue Mar 29, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@Monabr
Copy link

Monabr commented Mar 29, 2024

Ktorfit version

1.12.0

What happened and how can we reproduce this issue?

After creating a request, for example Get, the generated class will have a field qualifiedTypename which will contain the full path to the response model from the request.

What did you expect to happen?

I understand that this name is possibly used to assign a key to this model. But this violates the principles of obfuscation! I would expect that I would be able to set such a name myself (I would enter some unique random string) or the code would do it itself, but would not store the full name of the model class.

Is there anything else we need to know about?

I would like to see this behavior corrected as quickly as possible. I want to use this library, but this issue makes me worry about attackers learning more about the project structure due to this obfuscation issue.

@Monabr Monabr added the bug Something isn't working label Mar 29, 2024
@Foso
Copy link
Owner

Foso commented Apr 27, 2024

Hi @Monabr the idea behind qualifiedTypename was to have a way to get access to the full path from inside a ConverterFactory for non-JVM targets, because there you only get the class name by reflection.
I think i can add a option to keep the value empty. When none of your converters use qualifiedTypename it should work without any problems

@Monabr
Copy link
Author

Monabr commented May 4, 2024

@Foso Hi. Is the option already implemented? Want to try it.

@Foso
Copy link
Owner

Foso commented May 5, 2024

@Foso Foso added this to the 2.0.0 milestone May 28, 2024
@Foso
Copy link
Owner

Foso commented May 28, 2024

It's implemented with 2.0.0

@Foso Foso closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants