MassiveCraft / Factions

https://www.massivecraft.com/factions
245 stars 590 forks source link

Don't allow nameless or null-named factions #1205

Open Hyronymos opened 7 years ago

Hyronymos commented 7 years ago

Error Log: https://hastebin.com/egigocopok.sql Full server log: https://hastebin.com/yozorumaze.md

markhughes commented 7 years ago

Thanks for reporting. Can you please try running the server in online mode and see if the issue persists?

Hyronymos commented 7 years ago

no because we use bungeecord :/

markhughes commented 7 years ago

I was asking this as a way to debug the issue, to see if 1.8 + offline mode causes problems. As we don't test against 1.8 + offline mode.

markhughes commented 7 years ago

Can you also try creating a faction with a minimum length of 3 characters?

Hyronymos commented 7 years ago

Does not work too with the minimum length of 3 characters

markhughes commented 7 years ago

I am having trouble replicating this issue.

1) Are you using the latest version of Java? Can you trying using Java 1.8 if you aren't already (check with java -version)

2) When did this issue occur? Did you make any recent changes?


As console:

>f create abc
[10:13:16 INFO]: You created the faction abc
[10:13:16 INFO]: You should now: /f description <desc>
[10:13:16 INFO]: [Factions 2.10.0] @console created a new faction: abc
>version
[10:13:59 INFO]: This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

As player:

[10:16:35 INFO]: MarkehMe issued server command: /f create test
[10:16:35 INFO]: [Factions 2.10.0] MarkehMe created a new faction: test
>version
[10:18:29 INFO]: This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
Hyronymos commented 7 years ago

I testet it on online-mode and it does not work too

java version "1.8.0_121"

and nothing, I have the issues since 2 weeks

Hyronymos commented 7 years ago

I deleted all directorys too, only factions_board, factions_faction and factions_mplayer not and it does not work

markhughes commented 7 years ago

Is this just /f create? What happens when you run /f list?

Hyronymos commented 7 years ago

f list works fine

Hyronymos commented 7 years ago

every command like; /f join name or /f status name does not work (all with a 3rd argument does not work)

markhughes commented 7 years ago

Ok now we are getting somewhere! 🎉 Can you supply your factions_faction file?

Hyronymos commented 7 years ago

factions_faction.zip

markhughes commented 7 years ago

I have found the issue with your database. It seems the faction with the id 94951d47-408f-3726-a6be-bc5d7fe8994c was created without a name (it is a null name)

To check this I imported your database into mongodb using: (You don't need to do this, I'm just explaining how I found the problem)

>mcore store copydb flatfile mongodb
[10:51:48 INFO]: Now copying database with 9 collections.
[10:51:48 INFO]: Now copying collection 1/9 factions_faction with 508 documents
...

Then I could run this query to find the faction with no name:

screen shot 2017-03-21 at 10 52 58 am

So I disbanded that faction and I can now execute commands:

BACKUP YOUR MSTORE BEFORE YOU DO THIS

>f disband 94951d47-408f-3726-a6be-bc5d7fe8994c
[10:52:46 INFO]: You disbanded null.
[10:52:46 INFO]: [Factions 2.10.0] The faction null (94951d47-408f-3726-a6be-bc5d7fe8994c) was disbanded by @console.
>f create abc
[10:52:49 INFO]: You created the faction abc
[10:52:49 INFO]: You should now: /f description <desc>
[10:52:49 INFO]: [Factions 2.10.0] @console created a new faction: abc

Did disbanding that faction solve your issue? I'm not to sure how this happened. But you should check that factionNameLengthMin is at least 1

markhughes commented 7 years ago

On further testing we should not allow nameless factions

>f create ""
[11:00:41 INFO]: You created the faction
[11:00:41 INFO]: You should now: /f description <desc>
[11:00:41 INFO]: [Factions 2.10.0] @console created a new faction:
markhughes commented 7 years ago

@Hyronymos can you confirm if my method fixed this?

Hyronymos commented 7 years ago

yes, thanks a mill!