Skip to content

Running a non-existent command in /fcdb lua crashes the server #2876

@XHawk87

Description

@XHawk87

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. The server needs to be started with --auth enabled.
  2. Pass something to -D/--Database.
  3. Provide a database.lua. See manual.
  4. In the server console, enter: fcdb lua This is fine.
  5. Observe crash.

Expected behavior
A clear and concise explanation of why this is NOT fine to write in Lua, and the server keeps running.

Console logs

> fcdb lua This is fine.
[sol2] An error occurred and has been passed to an error handler: sol: syntax error: [string " This is fine."]:1: syntax error near 'is'
terminate called after throwing an instance of 'sol::error'
  what():  sol: syntax error: [string " This is fine."]:1: syntax error near 'is'

Platform and version (please complete the following information):

  • OS: Debian
  • Freeciv21 version: 3.2-dev (f2eca12)
  • Ruleset/Longturn game (if applicable): CTF

Additional context
Discussion on discord

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingluaIssues related to our Lua scriptcoreserverThis issue requires changes to the server

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions