sid-ramakrishnan / gomoku-desktop Goto Github PK
View Code? Open in Web Editor NEWThis project forked from oliviawyq/gomoku-desktop
Alpha Gomoku Game
This project forked from oliviawyq/gomoku-desktop
Alpha Gomoku Game
In File : Gomoku-Desktop/server/src/main/java/com/gomoku/server/redis/model/Room.java
For method joinRoom the body automatically ignores any exception of type Exception, which is dangerous because it will mask critical programming errors.
public boolean joinRoom(String audience){
try{
this.audience.add(audience);
return true;
}catch (Exception e){
//System.out.println(e);
return false;
}
}
In file : Gomoku-Desktop/server/src/main/java/com/gomoku/server/websocket/model/GameStatus.java
The getAudience method insecurely returns a mutable field object (Set). For security concerns this can lead to uncontrolled modification of the object by a user. This can be fixed by returning a copy of the the audience set instead of the original set.
public Set<WebSocketSession> getAudience() {
return audience;
}
In file: Gomoku-Desktop/server/src/main/java/com/gomoku/server/redis/model/Room.java
In the following code we see the public class Room, and a public void method also called Room. This public void method was most likely meant to be a constructor, so to fix this just delete the void in the Room method to make it a constructor.
public class Room implements Serializable {
@Id
private String roomName;
private String master;
private String guest;
private Set<String> audience;
private boolean playing;
private String gameNo;
public void Room(String roomName, String master){
this.roomName = roomName;
this.master = master;
this.audience = new HashSet<>();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.