Compare commits

...

2 Commits

5 changed files with 20 additions and 24 deletions

View File

@ -1,4 +1,4 @@
<h3>Wersja 4.13.2-rc.2, 2022-11-25</h3>
<h3>Wersja 4.13.2-rc.3, 2022-11-25</h3>
<ul>
<li>Poprawiono synchronizację w Mobidzienniku bez adresu e-mail.</li>
<li>Poprawiono błąd synchronizacji w Vulcanie.</li>

View File

@ -9,7 +9,7 @@
/*secret password - removed for source code publication*/
static toys AES_IV[16] = {
0x1c, 0x6e, 0x5f, 0x6b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
0xff, 0xc3, 0xe3, 0x82, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);

View File

@ -228,20 +228,6 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
val callback = object : JsonCallbackHandler() {
override fun onSuccess(json: JsonObject?, response: Response?) {
if (allow404 && response?.code() == HTTP_NOT_FOUND) {
try {
onSuccess(null as T, response)
} catch (e: Exception) {
data.error(
ApiError(tag, EXCEPTION_VULCAN_HEBE_REQUEST)
.withResponse(response)
.withThrowable(e)
.withApiResponse(json)
)
}
return
}
if (json == null) {
data.error(
ApiError(TAG, ERROR_RESPONSE_EMPTY)
@ -311,6 +297,19 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
}
override fun onFailure(response: Response?, throwable: Throwable?) {
if (allow404 && response?.code() == HTTP_NOT_FOUND) {
try {
onSuccess(null as T, response)
} catch (e: Exception) {
data.error(
ApiError(tag, EXCEPTION_VULCAN_HEBE_REQUEST)
.withResponse(response)
.withThrowable(e)
)
}
return
}
data.error(
ApiError(tag, ERROR_REQUEST_FAILURE)
.withResponse(response)
@ -338,9 +337,6 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
setTextBody(jsonString, MediaTypeUtils.APPLICATION_JSON)
}
}
if (allow404)
allowErrorCode(HttpURLConnection.HTTP_NOT_FOUND)
}
.allowErrorCode(HttpURLConnection.HTTP_BAD_REQUEST)
.allowErrorCode(HttpURLConnection.HTTP_FORBIDDEN)
@ -449,8 +445,8 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
)
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
apiGet(tag, url, query, allow404) { json: JsonArray, response ->
onSuccess(json.map { it.asJsonObject }, response)
apiGet(tag, url, query, allow404) { json: JsonArray?, response ->
onSuccess(json?.map { it.asJsonObject } ?: listOf(), response)
}
}
}

View File

@ -46,6 +46,6 @@ object Signing {
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
return "$param1.MTIzNDU2Nzg5MDcenMiuYc===.$param2".sha256()
return "$param1.MTIzNDU2Nzg5MDKkgTGqLh===.$param2".sha256()
}
}

View File

@ -5,8 +5,8 @@ buildscript {
kotlin_version = '1.6.10'
release = [
versionName: "4.13.2-rc.2",
versionCode: 4130220
versionName: "4.13.2-rc.3",
versionCode: 4130230
]
setup = [