Commit graph

196 commits

Author SHA1 Message Date
Ibrahim Zidan
4ccf878b75
Fix warning C4702 (unreachable code) in httpparser_parse
* According to original author the code might have been a left over from
  a previous fix, a test was conducted and confirmed the code isn't
  required.

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:47 +03:00
Haru
3ac77db7c8
Fix warning C4702 (unreachable code) in aclif_get_first_world_name 2026-07-21 02:03:41 +03:00
Ibrahim Zidan
d118e31fec
Change all identifiers named delete to delete_ for C++ compatability
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:36 +03:00
Ibrahim Zidan
f9617a5d24
Fix sign comparison mismatch in api-server target
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:31 +03:00
Ibrahim Zidan
5f01411c14
Remove -Wno-discarded-qualifiers and fix const qualifiers warnings
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-20 02:52:35 +03:00
Ibrahim Zidan
f00c0f910e
Update copyrights for year 2026
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-28 21:05:37 +03:00
Ibrahim Zidan
15e8c00c20
Source changes to correctly build on windows with cmake and required changes for a 64bit build
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:21:31 +03:00
Ibrahim Zidan
61317f925c
Remove libgif from 3rdparty and move to conan package
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:21:30 +03:00
Ibrahim Zidan
9f7626b864
Add sql custom target to emulate make file build behavior
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:20:58 +03:00
Ibrahim Zidan
934d73f4cb
Removal of the old makefile and autoconf build system
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:20:57 +03:00
Ibrahim Zidan
e34af13a62
Fix config headers was not being correctly added to server targets
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:20:55 +03:00
Ibrahim Zidan
6f214ee7dd
Addition of CMakeFileLists to compile login, char, map and api server
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:20:53 +03:00
Haru
2c181a6d4a
Update copyrights for year 2025
Signed-off-by: Haru <haru@dotalux.com>
2025-02-01 00:44:18 +00:00
Haru
daca5167ed
Welcome to 2024, Hercules
(update copyright year in headers)

Signed-off-by: Haru <haru@dotalux.com>
2024-02-04 02:26:34 +01:00
Guilherme G. Menaldo
71aadaeb94
add base62 encoding module with int support 2023-10-15 18:33:56 -03:00
Andrei Karas
e8b5bd6a6c Add missing include into HPMapi.c and HPMlogin.c
This include allow use in plugins header "common/packets_struct.h"
2023-08-13 18:04:22 +03:00
Andrei Karas
957e392fa1 Add define for log login/logout events on api server
Logging disable by default.
2023-06-16 04:24:17 +03:00
Andrei Karas
9f762a115d Add check for empty char server response in api handler emblem_download
This can happened if requested emblem for not existing guild.
2023-05-10 16:44:38 +03:00
Andrei Karas
0967c63f9a Disable full requests logging in api server 2023-04-22 02:20:04 +03:00
Haru
932f86edfd
Fix a warning when compiling with gcc-12
Signed-off-by: Haru <haru@dotalux.com>
2023-04-13 00:15:25 +02:00
Andrei Karas
2fca727096 Fix memory leaks in api-server termination 2023-04-12 02:54:01 +03:00
Asheraf
7b9c9194a7 Fix aclif_decode_post_headers proceeding with the request in case of header errors 2023-04-12 02:54:01 +03:00
Guilherme G. Menaldo
5bd714f3ae fix API response when userconfig hotkeys errors
providing a error status prevents clients from overriding their data
with bad one, and also show a proper error message to the user.

Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:01 +03:00
Guilherme G. Menaldo
ca502e9d2a fix userconfig API emotes default loading
Not having data and a server error were both being handled as no data,
which would lead a query error to overwrite user configs with defaults.

We now send a proper error when it fails to load due to an application
error. This makes official clients inform user about the issue and not
override their configs.

Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:00 +03:00
Guilherme G. Menaldo
97699d3096 add emblem API error response
Providing an error code allows client some feedback to the user when the
emblem gets rejected or something goes wrong in the middle of the
process.

Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:00 +03:00
Guilherme G. Menaldo
eae4e58f39 add HTTP Status codes and way to send json text
Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:00 +03:00
Guilherme G. Menaldo
6844ad5956 send the correct Content-Type for JSON responses
Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:00 +03:00
Guilherme G. Menaldo
9e90c7f235 add handling for "Expect: 100-continue" header
official clients sends this header and not handling it properly
causes the client to hold the payload for some time, making
the entire request take longer.

Signed-off-by: Guilherme G. Menaldo <guilherme.menaldo@outlook.com>
2023-04-12 02:54:00 +03:00
Andrei Karas
d745bc6c00 Add compile time validation for constant MAX_RESPONSE_SIZE 2023-04-12 02:54:00 +03:00
Andrei Karas
6627a51fc7 Add define for show/hide http requests
New define: REQUEST_LOG
2023-04-12 02:54:00 +03:00
Andrei Karas
68e84d5fde Add missing DEBUG_LOG defines for log received packets information
Disabled by default.
2023-04-12 02:54:00 +03:00
Andrei Karas
3d85bb094c Fix some cast warnings in clang 2023-04-12 02:54:00 +03:00
Andrei Karas
e05e3a9ca6 Add missing extraconf inits for support HPM in all servers 2023-04-12 02:54:00 +03:00
Andrei Karas
eff159ff39 Replace safesnprintf to snprintf 2023-04-12 02:54:00 +03:00
Andrei Karas
ca9155b900 Add configuration file with default emotes
Fix possible buffer overflow in emotes.
2023-04-12 02:54:00 +03:00
Andrei Karas
2a5ec9398d Add interface extraconf
Also add guild emblems configuration parameters and use them from new config.
Use extraconf for load/parse conf/common/emblems.conf
2023-04-12 02:54:00 +03:00
Andrei Karas
8f27d702f7 Remove hardcoded guild emblem limits in api and char servers 2023-04-12 02:54:00 +03:00
Andrei Karas
fd1b42e2e1 Show gif emblem format errors in api server on emblem upload 2023-04-12 02:53:59 +03:00
Andrei Karas
5862c1cf69 Split chunked wfifo and rfifo macroses into separate files 2023-04-12 02:53:59 +03:00
Andrei Karas
4b28d53626 Update HPM 2023-04-12 02:53:59 +03:00
Andrei Karas
8298dcd9b3 Add struct for temporary buffer for chunked packets
New struct fifo_chunk_buf
2023-04-12 02:53:59 +03:00
Andrei Karas
3639f6c821 Add validation for gif images in imageparser interface
Move some image related constants into mmo.h
2023-04-12 02:53:59 +03:00
Andrei Karas
62cfa59f19 Move bmp guild emblem validation from char server into api server
Add interface imageparser for parse and validate images on api server.
2023-04-12 02:53:59 +03:00
Andrei Karas
a7d7a08370 Use account_id from connection object in HTTP_URL(party_info) 2023-04-12 02:53:59 +03:00
Andrei Karas
edab248070 Add giflib as libgif
From commit 1aa11b06d0025eda77b56aec8254130654d4397b
2023-04-12 02:53:59 +03:00
Andrei Karas
87fb8d864e Add basic support for guild emblems in gif format 2023-04-12 02:53:58 +03:00
Andrei Karas
74990eebb8 Allow start uploading guild emblem in gif format on api server 2023-04-12 02:53:58 +03:00
Asheraf
3c23de0777 Add support for http party join request used on newer client versions 2023-04-12 02:53:58 +03:00
Andrei Karas
1c8fb9d1cd Move file api_network.conf into api directory 2023-04-12 02:53:58 +03:00
Andrei Karas
7741a2176d Add api server handler flag for allow only trusted ip to connect
Add new url handler flag REQ_TRUSTED.
2023-04-12 02:53:58 +03:00