assetto-corsa-web / accweb

Assetto Corsa Competizione Server Management Tool via Web Interface.
MIT License
144 stars 55 forks source link

[Error] Export Config #54

Closed Menteroth closed 4 years ago

Menteroth commented 4 years ago

image

Kugelschieber commented 4 years ago

When does this happen exactly?

Menteroth commented 4 years ago

When I click 'export config'.

dam09fr commented 4 years ago

I've noticed that if I use some special characters like '#' in the servername the export function does not work due to the lack of escaping in the URL.

Menteroth commented 4 years ago

All my server names have | in them.

dam09fr commented 4 years ago

Not sure how to do this but I think "${this.server.settings.serverName}" needs to be encoded by functions like encodeURIComponent() : image

Kugelschieber commented 4 years ago

Yes the server name can be anything which doesn't work for URLs. The backend doesn't care about the URL, only the id that is passed as a parameter is used to export the server (see https://github.com/assetto-corsa-web/accweb/blob/master/api/server.go#L199). So we can change that to something else...

Kugelschieber commented 4 years ago

Fixed: https://github.com/assetto-corsa-web/accweb/blob/master/public/src/components/server.vue#L51

Menteroth commented 4 years ago

Is this something I can fix locally or just wait for next update?

Kugelschieber commented 4 years ago

Wait for the next release.