IntellectualSites / IntellectualSites/PlotSquared

Adding & Trusting inserts data in the wrong table

Open
#3,085 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Bug Low Priority
Dominant language
Java
Stars
653
Forks
975
Avg merge
2m
Merged PRs (30d)
6

Description

  • /plot add inserts into plot_trusted
  • /plot trust inserts into plot_helpers

Currently this doesn't cause issues because the relevant calls such as Plot#isAdded() use the inverted methods internally which return the value expected. This may cause issues/confusion if you access the tables directly.
Per-design, plot add inserts into plot_helpers, because added members are internally referenced as helpers and plot trust goes into plot_trusted.
Addressing this issue must be done with caution to not screw up data down the line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementations of /plot add and /plot trust, then trace the Plot#isAdded() calls and the writes to plot_trusted and plot_helpers. Review how existing rows are interpreted before changing the mapping. Done means the commands write to their intended tables without changing the meaning of existing data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.