<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40170 >
> [EMAIL PROTECTED] - Wed Apr 02 22:39:35 2008]:
>
> On 28/03/2008, Madeline Book wrote:
> >
> > Actually, in the meantime, I thought of a better way: send the
> > error messages only to connections with hack access.
>
> Sounds sensible. Patch wanted.
Easy enough...
>From 49c086599fdc42b7cab767c4aef362dc904c8d32 Mon Sep 17 00:00:00 2001
From: Madeline Book <[EMAIL PROTECTED]>
Date: Thu, 3 Apr 2008 18:39:39 -0500
Subject: [PATCH] Only send E_LOG_ERROR and E_LOG_FATAL messages to connections with hack access.
---
server/plrhand.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/server/plrhand.c b/server/plrhand.c
index 85ec4a7..15686e6 100644
--- a/server/plrhand.c
+++ b/server/plrhand.c
@@ -670,6 +670,15 @@ void vnotify_conn(struct conn_list *dest, struct tile *ptile,
genmsg.conn_id = -1;
conn_list_iterate(dest, pconn) {
+
+ /* Avoid sending messages that could potentially reveal
+ * internal information about the server machine to
+ * connections that do not already have hack access. */
+ if ((event == E_LOG_ERROR || event == E_LOG_FATAL)
+ && pconn->access_level != ALLOW_HACK) {
+ continue;
+ }
+
if (S_S_RUNNING <= server_state()
&& ptile /* special case, see above */
&& ((NULL == pconn->playing && pconn->observer)
--
1.5.3.8
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev