Skip to content

Commit 113c952

Browse files
Merge branch 'master' into Compress
2 parents efa196e + fd7586c commit 113c952

File tree

218 files changed

+8048
-7193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+8048
-7193
lines changed

.github/workflows/Build.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,14 @@ jobs:
8080
master)
8181
echo "## Is MASTER branch"
8282
83-
versionChangelist="-stable.$timestamp-SNAPSHOT"
83+
versionChangelist="-preview.$timestamp-SNAPSHOT"
8484
SHOULD_DEPLOY='true'
8585
;;
8686
8787
beta)
88-
echo "## Is BETA branch, add +100 to major number"
88+
echo "## Is BETA branch"
8989
90-
pomMajorNumber=$(expr $pomMajorNumber + 100)
91-
92-
versionChangelist="-trunk.$timestamp-SNAPSHOT"
90+
versionChangelist="-beta.$timestamp-SNAPSHOT"
9391
SHOULD_DEPLOY='true'
9492
;;
9593
@@ -178,33 +176,16 @@ jobs:
178176
MAVEN_USERNAME: ${{ secrets.MAVEN_OSSRH_USERNAME }}
179177
MAVEN_PASSWORD: ${{ secrets.MAVEN_OSSRH_TOKEN }}
180178
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_BUILDER_PASSPHRASE }}
181-
182-
dispatch-build:
183-
name: Dispatch build result
184-
needs: build
185-
if: github.repository_owner == 'GeneXusLabs' && needs.build.outputs.SHOULD_DEPLOY == 'true'
186-
187-
runs-on: ubuntu-latest
188-
179+
180+
update-genexus-dependency:
189181
concurrency:
190182
group: build-${{ github.ref }}
191183
cancel-in-progress: true
192-
193-
steps:
194-
- name: Checkout action
195-
uses: actions/checkout@v2
196-
with:
197-
repository: genexuslabs/dispatch-build-result
198-
ref: releases/v2
199-
token: ${{ secrets.SECURE_TOKEN }}
200-
path: ./tmp/.github/actions/dispatch-build-result
201-
202-
- name: Dispatch build result
203-
uses: ./tmp/.github/actions/dispatch-build-result
204-
with:
205-
component-name: ${{ github.event.inputs.repository }}
206-
branch-ref: ${{ env.GIT_REF }}
207-
new-version: ${{ needs.build.outputs.MAVEN_VERSION }}
208-
committer: ${{ needs.build.outputs.LAST_COMMITTER }}
209-
commit-message: ${{ needs.build.outputs.COMMIT_MESSAGE }}
210-
token: ${{ secrets.SECURE_TOKEN }}
184+
uses: genexuslabs/build-genexus-reusable-workflow/.github/workflows/update-genexus-dep-version.yml@main
185+
needs: build
186+
if: github.repository_owner == 'genexuslabs' && needs.build.outputs.SHOULD_DEPLOY == 'true'
187+
with:
188+
VERSION: ${{ needs.build.outputs.MAVEN_VERSION }}
189+
PACKAGE_NAMES: ${{ needs.build.outputs.PACKAGES_NAME }}
190+
COMMITTER: ${{ needs.build.outputs.LAST_COMMITTER }}
191+
secrets: inherit

.github/workflows/call-beta-bot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Call Beta Bot
2+
3+
on:
4+
# Triggers the workflow on push to beta branch or changes in a pull request to main branch
5+
push:
6+
branches: [ "beta" ]
7+
pull_request:
8+
types: [ opened, synchronize, reopened, ready_for_review, closed, labeled, unlabeled ]
9+
branches: [ "master" ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
call-workflow:
16+
if: github.repository_owner == 'genexuslabs'
17+
uses: genexuslabs/build-genexus-reusable-workflow/.github/workflows/run-beta-bot.yml@main
18+
secrets: inherit

android/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<groupId>commons-io</groupId>
2424
<artifactId>commons-io</artifactId>
2525
</exclusion>
26-
<exclusion> <!-- exclude bouncycastle from android -->
27-
<groupId>org.bouncycastle</groupId>
28-
<artifactId>bcprov-jdk18on</artifactId>
29-
</exclusion>
3026
</exclusions>
3127
</dependency>
3228
<dependency>
@@ -38,10 +34,6 @@
3834
<groupId>commons-io</groupId>
3935
<artifactId>commons-io</artifactId>
4036
</exclusion>
41-
<exclusion> <!-- exclude bouncycastle from android -->
42-
<groupId>org.bouncycastle</groupId>
43-
<artifactId>bcprov-jdk18on</artifactId>
44-
</exclusion>
4537
</exclusions>
4638
</dependency>
4739
<dependency>
@@ -66,14 +58,6 @@
6658
<artifactId>commons-io</artifactId>
6759
<version>2.2</version>
6860
</dependency>
69-
<!-- add explicit bouncycastle in Android, version used in Android Flexible client -->
70-
<!-- keep in sync version here and in Android Flexible client -->
71-
<dependency>
72-
<groupId>org.bouncycastle</groupId>
73-
<artifactId>bcprov-jdk15on</artifactId>
74-
<version>1.65</version>
75-
</dependency>
76-
7761
</dependencies>
7862

7963
<build>

android/src/main/java/com/artech/base/synchronization/bc/PendingEventHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.genexus.GxSilentTrnSdt;
1010
import com.genexus.IGxSilentTrn;
1111

12-
import json.org.json.JSONArray;
12+
import org.json.JSONArray;
1313

1414
public class PendingEventHelper {
1515

android/src/main/java/com/artech/synchronization/ISynchronizationHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import java.util.TreeMap;
44

5-
import json.org.json.JSONArray;
5+
import org.json.JSONArray;
66

77
public interface ISynchronizationHelper {
88

android/src/main/java/com/genexus/GXutil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.genexus.util.GXThreadLocal;
2222
import com.genexus.util.IThreadLocal;
2323

24-
import json.org.json.JSONObject;
24+
import org.json.JSONObject;
2525

2626
public final class GXutil
2727
{

android/src/main/java/com/genexus/db/driver/ExternalProviderMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.genexus.db.driver;
22

3-
import json.org.json.JSONException;
4-
import json.org.json.JSONObject;
3+
import org.json.JSONException;
4+
import org.json.JSONObject;
55

66
public class ExternalProviderMetadata
77
{

android/src/main/java/com/genexus/internet/HttpAjaxContext.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
import java.util.ArrayList;
44
import java.util.Stack;
55

6-
import json.org.json.IJsonFormattable;
7-
import json.org.json.JSONArray;
8-
import json.org.json.JSONException;
9-
import json.org.json.JSONObject;
6+
import org.json.JSONArray;
7+
import org.json.JSONException;
8+
import org.json.JSONObject;
109

1110
public abstract class HttpAjaxContext
1211
{
@@ -497,7 +496,7 @@ public Object GetJSONObject()
497496
return wrapper;
498497
}
499498

500-
public void FromJSONObject(IJsonFormattable obj)
499+
public void FromJSONObject(Object obj)
501500
{
502501
}
503502

android/src/main/java/com/genexus/internet/HttpContext.java

Lines changed: 6 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,22 @@
1111

1212
import com.artech.base.services.AndroidContext;
1313
import com.genexus.util.Codecs;
14-
import com.genexus.util.Encryption;
1514

16-
import json.org.json.IJsonFormattable;
17-
import json.org.json.JSONArray;
18-
import json.org.json.JSONException;
19-
import json.org.json.JSONObject;
15+
import org.json.JSONArray;
16+
import org.json.JSONException;
17+
import org.json.JSONObject;
2018

2119
public abstract class HttpContext extends HttpAjaxContext implements IHttpContext
2220
{
23-
private static String GX_AJAX_REQUEST_HEADER = "GxAjaxRequest";
24-
2521
protected boolean PortletMode = false;
26-
protected boolean AjaxCallMode = false;
27-
protected boolean AjaxEventMode = false;
28-
protected boolean FullAjaxMode = false;
2922
public boolean drawingGrid = false;
3023

3124
public void setPortletMode()
3225
{ PortletMode = true; }
3326

34-
public void setAjaxCallMode()
35-
{ AjaxCallMode = true; }
36-
37-
public void setFullAjaxMode()
38-
{ FullAjaxMode = true; }
39-
40-
public void setAjaxEventMode()
41-
{ AjaxEventMode = true; }
42-
4327
public boolean isPortletMode()
4428
{ return PortletMode; }
4529

46-
public boolean isAjaxCallMode()
47-
{ return AjaxCallMode; }
48-
49-
public boolean isAjaxEventMode()
50-
{ return AjaxEventMode; }
51-
52-
public boolean isFullAjaxMode()
53-
{ return FullAjaxMode; }
54-
55-
public boolean isAjaxRequest()
56-
{ return isAjaxCallMode() || isAjaxEventMode() || isPortletMode() || isFullAjaxMode(); }
57-
58-
5930
public byte wbGlbDoneStart = 0;
6031
//nSOAPErr
6132
public HttpResponse GX_webresponse;
@@ -386,7 +357,7 @@ public void windowClosed()
386357

387358
public void pushCurrentUrl()
388359
{
389-
if (getRequestMethod().equals("GET") && !isAjaxRequest())
360+
if (getRequestMethod().equals("GET"))
390361
{
391362
String sUrl = getRequestNavUrl().trim();
392363
String topUrl = getNavigationHelper().peekUrl(sUrl);
@@ -410,106 +381,9 @@ public void printReportAtClient(String reportFile, String printerRule)
410381
{
411382
addPrintReportCommand(getResource(reportFile), printerRule);
412383
}
413-
414-
public boolean isGxAjaxRequest()
415-
{
416-
if (this.isMultipartContent())
417-
{
418-
return true;
419-
}
420-
// String gxHeader = getRequest().getHeader(GX_AJAX_REQUEST_HEADER);
421-
// if (gxHeader != null && gxHeader.trim().length() > 0)
422-
// {
423-
// return true;
424-
// }
425-
return false;
426-
}
427-
428-
private String getAjaxEncryptionKey()
429-
{
430-
if(getSessionValue(Encryption.AJAX_ENCRYPTION_KEY) == null)
431-
{
432-
if (!recoverEncryptionKey())
433-
{
434-
webPutSessionValue(Encryption.AJAX_ENCRYPTION_KEY, Encryption.getRijndaelKey());
435-
}
436-
}
437-
return (String)getSessionValue(Encryption.AJAX_ENCRYPTION_KEY);
438-
}
439-
440-
private boolean recoverEncryptionKey()
441-
{
442-
if (getSessionValue(Encryption.AJAX_ENCRYPTION_KEY) == null)
443-
{
444-
// String clientKey = getRequest().getHeader(Encryption.AJAX_SECURITY_TOKEN);
445-
// if (clientKey != null && clientKey.trim().length() > 0)
446-
// {
447-
// boolean candecrypt[]=new boolean[1];
448-
// clientKey = Encryption.decryptRijndael(clientKey, Encryption.GX_AJAX_PRIVATE_KEY, candecrypt);
449-
// if (candecrypt[0])
450-
// {
451-
// webPutSessionValue(Encryption.AJAX_ENCRYPTION_KEY, clientKey);
452-
// return true;
453-
// }else
454-
// {
455-
// return false;
456-
// }
457-
// }
458-
}
459-
return false;
460-
}
461-
462-
public String DecryptAjaxCall(String encrypted)
463-
{
464-
validEncryptedParm = false;
465-
if (isGxAjaxRequest())
466-
{
467-
String key = getAjaxEncryptionKey();
468-
boolean candecrypt[] = new boolean[1];
469-
String decrypted = Encryption.decryptRijndael(encrypted, key, candecrypt);
470-
validEncryptedParm = candecrypt[0];
471-
if (!validEncryptedParm)
472-
{
473-
sendResponseStatus(403, "Forbidden action");
474-
return "";
475-
}
476-
if (validEncryptedParm && !getRequestMethod().equalsIgnoreCase("post"))
477-
{
478-
setQueryString(decrypted);
479-
decrypted = GetNextPar();
480-
}
481-
return decrypted;
482-
}
483-
return encrypted;
484-
}
485-
486-
public boolean IsValidAjaxCall()
487-
{
488-
return IsValidAjaxCall(true);
489-
}
490-
491-
public boolean IsValidAjaxCall(boolean insideAjaxCall)
492-
{
493-
if (insideAjaxCall && !validEncryptedParm)
494-
{
495-
sendResponseStatus(403, "Forbidden action");
496-
return false;
497-
}
498-
else if (!insideAjaxCall && isGxAjaxRequest())
499-
{
500-
sendResponseStatus(440, "Session timeout");
501-
return false;
502-
}
503-
return true;
504-
}
505384

506385
public void sendResponseStatus(int statusCode, String statusDescription)
507386
{
508-
//getResponse().setStatus(statusCode);
509-
//try { getResponse().sendError(statusCode, statusDescription); }
510-
//catch(Exception e) {}
511-
//setAjaxCallMode();
512-
//disableOutput();
513387
}
514388

515389
private void sendReferer()
@@ -579,28 +453,11 @@ public String decrypt64(String value, String key)
579453
}
580454
return sRet;
581455
}
582-
583-
public void SendAjaxEncryptionKey()
584-
{
585-
if(!encryptionKeySended)
586-
{
587-
String key = getAjaxEncryptionKey();
588-
ajax_rsp_assign_hidden(Encryption.AJAX_ENCRYPTION_KEY, key);
589-
ajax_rsp_assign_hidden(Encryption.AJAX_ENCRYPTION_IV, Encryption.GX_AJAX_PRIVATE_IV);
590-
591-
try
592-
{
593-
ajax_rsp_assign_hidden(Encryption.AJAX_SECURITY_TOKEN, Encryption.encryptRijndael(key, Encryption.GX_AJAX_PRIVATE_KEY));
594-
}
595-
catch(Exception exc) {}
596-
encryptionKeySended = true;
597-
}
598-
}
599456

600457
public void SendServerCommands()
601458
{
602459
try {
603-
if (!isAjaxRequest() && commands.getCount() > 0)
460+
if (commands.getCount() > 0)
604461
{
605462
HiddenValues.put("GX_SRV_COMMANDS", commands.getJSONArray());
606463
}
@@ -613,7 +470,7 @@ public void ajax_req_read_hidden_sdt(String jsonStr, Object SdtObj)
613470
{
614471
try
615472
{
616-
IJsonFormattable jsonObj;
473+
Object jsonObj;
617474
if (jsonStr.startsWith("["))
618475
jsonObj = new JSONArray(jsonStr);
619476
else

0 commit comments

Comments
 (0)