Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix_chat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Nerlich
matrix_chat
Commits
b54f0df5
Commit
b54f0df5
authored
7 years ago
by
Jon Neverland
Committed by
texmex
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove need for secure.enable_security (#7)
With changes in lua-matrix mod now works with only secure.trusted_mods
parent
fab8a5a7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+7
-3
7 additions, 3 deletions
README.md
init.lua
+8
-1
8 additions, 1 deletion
init.lua
lua-matrix
+1
-1
1 addition, 1 deletion
lua-matrix
with
16 additions
and
5 deletions
README.md
+
7
−
3
View file @
b54f0df5
...
...
@@ -20,6 +20,8 @@ luarocks-5.1 install lua-cjson
brew
install
openssl
luarocks-5.1
install
cqueues
CRYPTO_DIR
=
/usr/local/opt/openssl/
OPENSSL_DIR
=
/usr/local/opt/openssl
#https://github.com/wahern/cqueues/wiki/Installation-on-OSX#via-brew
luarocks-5.1
install
luaossl
CRYPTO_DIR
=
/usr/local/opt/openssl/
OPENSSL_DIR
=
/usr/local/opt/openssl
luarocks-5.1
install
luasocket
luarocks-5.1
install
luasec
OPENSSL_DIR
=
/usr/local/opt/openssl
export
MATRIX_API_HTTP_CLIENT
=
luasocket
```
...
...
@@ -30,15 +32,17 @@ Tested on 16.04.
```
bash
apt-get
install
lua5.1 luarocks lua-sec
luarocks
install
lua-cjson
luarocks
install
luasocket
luarocks
install
luasec
export
MATRIX_API_HTTP_CLIENT
=
luasocket
```
You might need to prepend
`sudo`
to first and second commands.
For the moment you need to
disabled mod security
for lua-matrix to work. This will hopefully change.
For the moment you need to
add
`matrix`
to
`secure.trusted_mods`
for lua-matrix to work. This will hopefully change.
```
secure.
enable_security = false
secure.
trusted_mods = matrix
```
[
wiki
]:
https://wiki.minetest.net/Installing_mods
...
...
This diff is collapsed.
Click to expand it.
init.lua
+
8
−
1
View file @
b54f0df5
...
...
@@ -8,7 +8,7 @@ local ie, req_ie = _G, minetest.request_insecure_environment
if
req_ie
then
ie
=
req_ie
()
end
if
not
ie
then
error
(
"The Matrix mod requires access to insecure functions in order "
..
"to work. Please
disable mod security. This will hopefully change
."
)
"to work. Please
add matrix to secure.trusted_mods
."
)
end
ie
.
package
.
path
=
...
...
@@ -29,6 +29,10 @@ local function eprintf(fmt, ...)
minetest
.
log
(
"info"
,
fmt
:
format
(
...
))
end
-- Temporarily set require so that LuaIRC can access it
local
old_require
=
require
require
=
ie
.
require
local
client
=
require
(
"matrix"
).
client
(
matrix
.
config
.
server
..
":"
..
matrix
.
config
.
port
)
local
start_ts
=
os.time
()
*
1000
...
...
@@ -139,3 +143,6 @@ function matrix.say(message)
end
end
end
-- Restore old (safe) functions
require
=
old_require
This diff is collapsed.
Click to expand it.
lua-matrix
@
151355a7
Compare
2946b558
...
151355a7
Subproject commit
2946b558101a22dd0770a2548f938ada86475256
Subproject commit
151355a7904640b98eef6dd59e43adefc0d178ea
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment