Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #692001

New permissive Lua server context

Added by Sveinung Kvilhaugsvik almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Scripting API
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Allow someone with the access level hack to run Lua code on the server without security restrictions.

Should obviously not load anything from savegames or from the ruleset. Doesn't connect to signals.

My current approach is to expand the lua command with hack cmd and hack file. Would it be cleaner as a separate command? (luahack cmd, luahack file, ...)?

My main motivation for this feature is that I want the ability to write tests in Lua that communicates with the outside world.


Related issues

Blocks Freeciv - Feature #692310: Add an unsafe Lua environment exampleClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Sveinung Kvilhaugsvik almost 5 years ago

#2 Updated by Sveinung Kvilhaugsvik almost 5 years ago

Untested patch.

#3 Updated by Sveinung Kvilhaugsvik almost 5 years ago

#4 Updated by Sveinung Kvilhaugsvik almost 5 years ago

  • Blocks deleted (Feature #692021: new test: all bundled rulesets are loading)

#5 Updated by Sveinung Kvilhaugsvik almost 5 years ago

  • Category set to Scripting API

#6 Updated by Sveinung Kvilhaugsvik almost 5 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

#7 Updated by Jacob Nevins almost 5 years ago

It looks like '/read' is allowed to execute '/lua unsafe-file' etc.

Since rulesets are generally distributed with a .serv script, we should probably restrict what '/read' can do, even if executed from console / with 'hack' access. (In another ticket)

#8 Updated by Marko Lindqvist almost 4 years ago

Patch to revert this from S3_0, as per Bug #693065

#9 Updated by Marko Lindqvist almost 4 years ago

  • Status changed from Resolved to Closed
  • Sprint/Milestone changed from 3.0.0 to 3.1.0

Also available in: Atom PDF