fix
Устранены пропущенные уязвимости в некоторых проходах v++
This commit is contained in:
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int version = 1181;
|
||||
public static final int version = 1182;
|
||||
public static final int planner_version = 10;
|
||||
public static final int testingMaxKernels = 64; //вообще говоря, это параметр машины.
|
||||
//--
|
||||
|
||||
@@ -33,7 +33,8 @@ public class MainModule extends MainModule_<GlobalDatabase, MainUI> {
|
||||
PassCode.StartTestingServer,
|
||||
PassCode.PublishTestingServer,
|
||||
PassCode.CreateTestsGroupFromSelectedVersions,
|
||||
PassCode.RefreshDVMPackageResults
|
||||
PassCode.RefreshDVMPackageResults,
|
||||
PassCode.ConvertCorrectnessTests
|
||||
);
|
||||
public MainModule() throws Exception {
|
||||
super(GlobalDatabase.class, MainUI.class);
|
||||
|
||||
@@ -40,14 +40,11 @@ public class CheckAccount extends ComponentsServerPass {
|
||||
if (keyFile.exists()) {
|
||||
//ключ есть. проверить его актуальность.
|
||||
String key = FileUtils.readFileToString(keyFile);
|
||||
System.out.println("ключ найден.");
|
||||
if (SendRequest(ServerCode.GetUserAccountByKey,key)){
|
||||
if (request.server_response.object!=null){
|
||||
//ключ актуальный.
|
||||
System.out.println("ключ совпал");
|
||||
Global.mainModule.setAccount((UserAccount) request.server_response.object);
|
||||
}else {
|
||||
System.out.println("ключ не совпал!");
|
||||
//ключ неактуальный. регистрируемся по новой.
|
||||
UI.Error("Текущий ключ неверен. Он будет удален.");
|
||||
Utils_.forceDeleteWithCheck(keyFile);
|
||||
@@ -55,7 +52,6 @@ public class CheckAccount extends ComponentsServerPass {
|
||||
}
|
||||
}
|
||||
}else {
|
||||
System.out.println("ключ не найден!");
|
||||
confirmEmail();
|
||||
}
|
||||
return !Global.mainModule.getAccount().role.equals(AccountRole.Undefined);
|
||||
|
||||
@@ -36,10 +36,10 @@ public class ReplaceTestsFromFiles extends TestingServerPass<Vector<Test>> {
|
||||
//--->>>
|
||||
Utils.RestoreSelectedDirectory(fileChooser);
|
||||
Vector<File> files = fileChooser.ShowMultiDialog();
|
||||
//---------------------------------------------------------------
|
||||
//----------------ROLE is-----------------------------------------------
|
||||
//--
|
||||
File dir = fileChooser.getCurrentDirectory();
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", dir);
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", dir.getAbsolutePath());
|
||||
//---------------
|
||||
if (dir.getName().equals(Constants.data)) {
|
||||
Log.Writeln_(Utils_.Brackets(dir) + "\nявляется служебной папкой визуализатора!");
|
||||
|
||||
@@ -14,7 +14,7 @@ public abstract class AbortTestingPackage extends TestingServerPass<TestingPacka
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
packageToKill = null;
|
||||
if (getServer().db.CheckCurrent(Log, currentClass())) {
|
||||
if (getServer().db.canModifyCurrent(Log, currentClass())) {
|
||||
target = (TestingPackage) getServer().db.getTable(currentClass()).getUI().getCurrent();
|
||||
switch (target.state) {
|
||||
case Done:
|
||||
|
||||
@@ -407,7 +407,6 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name));
|
||||
lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email));
|
||||
lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription()));
|
||||
System.out.println("ROLE IS "+Global.mainModule.getAccount().role.getDescription());
|
||||
switch (Global.mainModule.getAccount().role) {
|
||||
case Undefined:
|
||||
setUdefinedRights();
|
||||
|
||||
Reference in New Issue
Block a user