summaryrefslogtreecommitdiff
path: root/src/login
AgeCommit message (Collapse)AuthorFilesLines
2015-08-05Add checks for servers ip address in inter server connections.Andrei Karas2-7/+9
If ip not in configured subnet, connection refused. This can protect servers from brutforcing attacks.
2015-07-12Add missing checks to account_sql.c.Andrei Karas1-4/+8
2015-07-12Add missing checks into login.cAndrei Karas1-2/+9
Also add some NONNULL attributes for known non null parameters.
2015-06-19Cleaned up HPMDataCheck includesHaru1-2/+14
Fixes some plugin load failures Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru6-16/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru11-76/+78
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Replaced some of the hardcoded values with constants (login)Haru3-26/+31
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-04-09Add checks to loginlog_sql.cAndrei Karas1-0/+5
2015-04-09Add checks to login.cAndrei Karas1-5/+31
2015-04-09Add checks to ipban_sql.cAndrei Karas1-4/+9
2015-04-09Add checks to account_sql.cAndrei Karas1-9/+38
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru2-12/+9
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
2015-01-18Command line arguments handling overhaulHaru2-24/+49
- login_server, char_server, map_server as well as the tools (mapcache) now have a common command line arguments handling mechanism. - All of them now accept `--help` (`-h`), `--version` (`-v`) and `--load-plugin`. - login_server now accepts `--login-config` and `--lan-config` instead of relying on positional arguments to override those files. The old syntax will no longer work, please update your custom startup scripts. - char_server now accepts `--char-config`, `--inter-config`, `--lan-config` instead of relying on positional arguments. The old syntax will no longer work, please update your custom startup scripts. - mapcache now accepts `--grf-list`, `--map-list`, `--map-cache`, `--rebuild` in place of, respectively, `-grf`, `-list`, `-cache`, `-rebuild`. - A new macro `CMDLINEARG()` is provided, to help defining new command line argument handlers (i.e. in plugins). the `addArg()` call is still required, but its syntax has changed. The `help` argument is now of type `const char *` rather than a function pointer, and it is supposed to contain the message to show in the `--help` screen. Pass `NULL` if no help message is desired. Signed-off-by: Haru <haru@dotalux.com>
2015-01-1710 Distinct fixesshennetsind1-1/+1
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru5-3/+20
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-12-31Improve performance a bit by removing strlen(str) > 0.Andrei Karas1-3/+3
2014-11-16Whitespace cleanup (no code changes)Haru4-100/+95
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-11-15In login server move config options handling by plugins after all other ↵Andrei Karas1-3/+2
handling.
2014-11-15Add support for plugin options in login server config.Andrei Karas1-0/+2
2014-11-11add AccountDB into login interface.Andrei Karas2-2/+5
2014-11-09Fixed a compilation error in MSVC <= 2012Haru1-2/+4
Special thanks to Angelmelody Signed-off-by: Haru <haru@dotalux.com>
2014-11-07Add login_config into login interface in login.cAndrei Karas2-0/+3
2014-11-07Add missing interface member initialisation in login.cAndrei Karas1-0/+1
2014-11-07Add login symbol in login server HPM.Andrei Karas1-0/+1
2014-11-07fix plugins compilation.Andrei Karas2-7/+7
2014-11-07Fix login_interface for allow generate hooks from it.Andrei Karas1-11/+14
2014-11-07Move global variables to interfaces in login.cAndrei Karas3-59/+62
2014-11-07Add most function to login interface in login.cAndrei Karas2-111/+230
2014-11-07Split packet handling from login_parse to functions in login.cAndrei Karas1-148/+187
2014-11-07Split packet handling from login_auth_ok to functions in login.cAndrei Karas1-24/+22
2014-11-07Split packet handling from login_parse_fromchar to functions in login.cAndrei Karas1-372/+534
2014-11-07Add prefix login_ to most functions in login.cAndrei Karas1-55/+55
2014-10-31Merge pull request #378 from HerculesWS/hpmupdatesHaruna5-18/+119
Char and login server preliminary support for the HPM system
2014-10-30Merge pull request #369 from 4144/sqlpasswordsizeHaruna3-6/+6
Increase sql password field size from 32 to 100 chars.
2014-10-28Added preliminary support for login and char server in the HPMDataCheckHaru5-18/+119
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-10-25Added some missing variable initializationsHaru1-0/+1
- The issue was caused by memcmp failing because of garbage in structs padding. - Fixes bugreport:8410, special thanks (and credits for the fix) to Garr http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/ - Also reduced scope of some variables, where appropriate. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2014-10-23In configure add option --enable-staticAndrei Karas1-1/+1
This option enable static build for server binaries and map cache. For plugins this option enable static linking with gcc.
2014-10-18Increase sql password field size from 32 to 100 chars.Andrei Karas3-6/+6
32 chars is very small for password.
2014-09-20Fixed Bug 7926shennetsind1-0/+5
Login server will now reject login requests with empty userids. Special Thanks to Haruna, Kisuka! http://hercules.ws/board/tracker/issue-7926-login-and-password-empty/ Signed-off-by: shennetsind <ind@henn.et>
2014-08-07Corrected several format-string errors through the codeHaru1-18/+15
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-29Merge pull request #312 from vthibault/fix-argument-errorKisuka1-1/+1
Fix argument error in Client Hash
2014-07-28Fix argument error in Client HashVincent Thibault1-1/+1
2014-07-11Fixed reserved __identifier violationsHaru4-12/+12
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-07-09Fixed an issue in the 'Invalid client hash' console messageHaru1-1/+2
- MD5 value was incorrectly printed as int (displaying a meaningless number) while it's in fact a string. Signed-off-by: Haru <haru@dotalux.com>
2014-06-06Fixed garbage memory in the accinfo packetIbrahim Hossam1-4/+6
2014-05-30Merge pull request #282 from MrKeiKun/fix_typoHaruna5-12/+12
Fixed some typo
2014-05-30Fixed typos inside src/Shido5-12/+12
2014-05-30Removed CMakeLists.txt (Thanks to Haruna)Shido2-51/+0
2014-05-25Improved CFLAGS/CPPFLAGS handlingHaru1-1/+3
- Language extensions, such as _GNU_SOURCE are now enabled through CPPFLAGS by the configure script, rather than within the source code. - Moved some configure-time CFLAGS to CPPFLAGS, where appropriate. - Fixes bugreport:8211, thanks to Neoth http://hercules.ws/board/tracker/issue-8211-compiling-warning-in-linux Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>