diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f9ee1b46d..adabe3185 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -212,7 +212,7 @@ jobs:
report_name: Coverage Frontend
type: lcov
result_path: ./coverage/lcov.info
- min_coverage: 19
+ min_coverage: 20
token: ${{ github.token }}
##############################################################################
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b03c78d5..a71ad2fd4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,36 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
+#### [1.0.2](https://github.com/gradido/gradido/compare/1.0.1...1.0.2)
+
+- fix: GDD Amount is Always Displayed with Two Digits [`#468`](https://github.com/gradido/gradido/pull/468)
+- fix: Date Time Formats [`#469`](https://github.com/gradido/gradido/pull/469)
+- Community ipv6 localhost [`#466`](https://github.com/gradido/gradido/pull/466)
+- Login html pages autoparse [`#464`](https://github.com/gradido/gradido/pull/464)
+- everything I find and fix crash related in login server this week (kw 20) [`#448`](https://github.com/gradido/gradido/pull/448)
+- 437 bug mobile transaction list is not easy to read [`#462`](https://github.com/gradido/gradido/pull/462)
+- Require memo in send [`#455`](https://github.com/gradido/gradido/pull/455)
+- bug: Thx Page Shows Content Dependent of Route From [`#459`](https://github.com/gradido/gradido/pull/459)
+- bug: responsive display error on pads fixed [`#461`](https://github.com/gradido/gradido/pull/461)
+- [Bug] German "Dir" is written with capital D in send validation bug [`#460`](https://github.com/gradido/gradido/pull/460)
+- feat: Save Locale in Database [`#450`](https://github.com/gradido/gradido/pull/450)
+- attention! notice in send area removed [`#458`](https://github.com/gradido/gradido/pull/458)
+- Remove Error Message encoding [`#456`](https://github.com/gradido/gradido/pull/456)
+- bug fix:mobile menu closes on logout, probs value problem on logout f… [`#454`](https://github.com/gradido/gradido/pull/454)
+- bug-login password change show hide inserted [`#453`](https://github.com/gradido/gradido/pull/453)
+- fix sorting and use total count [`#451`](https://github.com/gradido/gradido/pull/451)
+- add dynamic error email if transaction failed [`#452`](https://github.com/gradido/gradido/pull/452)
+- ceil the last decay [`#449`](https://github.com/gradido/gradido/pull/449)
+- feat: Raise Coverage of Frontend Unit Tets to 18% [`#447`](https://github.com/gradido/gradido/pull/447)
+- parse cpsp files automatic in build [`a4a12bb`](https://github.com/gradido/gradido/commit/a4a12bb62b4000e035ff15e17c5a5f5861653ff6)
+- translate german html encoded error messages to english and use gettext for automatic translation [`d339627`](https://github.com/gradido/gradido/commit/d33962736d94c1cb7a12ff775bc2c8d7505d646e)
+- 100% coverage of GddTransactionList [`96fb245`](https://github.com/gradido/gradido/commit/96fb245821c69f4d321204a663247d5eee60d92f)
+
#### [1.0.1](https://github.com/gradido/gradido/compare/1.0.0...1.0.1)
+> 14 May 2021
+
+- Login crash fix [`#444`](https://github.com/gradido/gradido/pull/444)
- add try catch blocks to prevent login-server from crashing [`22ff220`](https://github.com/gradido/gradido/commit/22ff22072956f8b843037c75c5b16b7ff5d6a2a3)
- fix [`14a4243`](https://github.com/gradido/gradido/commit/14a424347817b1fe6912a113bffd70e55d688112)
diff --git a/community_server/config/routes.php b/community_server/config/routes.php
index 322825c87..3b0dfedc1 100644
--- a/community_server/config/routes.php
+++ b/community_server/config/routes.php
@@ -65,8 +65,9 @@ Router::scope('/', function (RouteBuilder $routes) {
if($entry == 'ElopageWebhook' || $entry == 'AppRequests') {
return true;
}
- if($request->clientIp() == '127.0.0.1' || $request->clientIp() == 'localhost' || $request->clientIp() == '') {
- return true;
+ $allowedIpLocalhost = ['127.0.0.1', 'localhost', '', '::1'];
+ if(in_array($clientIp, $allowedIpLocalhost)) {
+ return true;
}
$allowedCaller = Configure::read('API.allowedCaller');
$ipPerHost = [];
diff --git a/community_server/src/Controller/AppRequestsController.php b/community_server/src/Controller/AppRequestsController.php
index 4cefdbd47..2ece0c726 100644
--- a/community_server/src/Controller/AppRequestsController.php
+++ b/community_server/src/Controller/AppRequestsController.php
@@ -156,6 +156,9 @@ class AppRequestsController extends AppController
if($required_fields !== true) {
return $this->returnJson($required_fields);
}
+ if(!isset($params['memo']) || strlen($params['memo']) < 5 || strlen($params['memo']) > 150) {
+ return $this->returnJson(['state' => 'error', 'msg' => 'memo is not set or not in expected range [5;150]']);
+ }
$params['transaction_type'] = 'transfer';
$requestAnswear = $this->JsonRequestClient->sendRequest(json_encode($params), '/createTransaction');
diff --git a/community_server/src/Controller/TransactionSendCoinsController.php b/community_server/src/Controller/TransactionSendCoinsController.php
index 033e2343f..1018309cc 100644
--- a/community_server/src/Controller/TransactionSendCoinsController.php
+++ b/community_server/src/Controller/TransactionSendCoinsController.php
@@ -237,6 +237,11 @@ class TransactionSendCoinsController extends AppController
$this->set('timeUsed', microtime(true) - $startTime);
return;
}
+ if($answear_data['msg'] === 'memo is not set or not in expected range [5;150]') {
+ $this->Flash->error(__('Ein Verwendungszweck zwischen 5 und 150 Zeichen wird benötig!'));
+ $this->set('timeUsed', microtime(true) - $startTime);
+ return;
+ }
} else if($answear_data['state'] === 'not found' && $answear_data['msg'] === 'receiver not found') {
$this->Flash->error(__('Der Empfänger wurde nicht auf dem Login-Server gefunden, hat er sein Konto schon angelegt?'));
$this->set('timeUsed', microtime(true) - $startTime);
diff --git a/frontend/babel.config.js b/frontend/babel.config.js
index faf55f74f..5907ab074 100644
--- a/frontend/babel.config.js
+++ b/frontend/babel.config.js
@@ -4,7 +4,6 @@ module.exports = {
[
'component',
{
- libraryName: 'element-ui',
styleLibraryName: 'theme-chalk',
},
],
diff --git a/frontend/package.json b/frontend/package.json
index 21b02ee2e..68b4a5807 100755
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-vue-gradido-wallet",
- "version": "1.0.1",
+ "version": "1.0.2",
"private": true,
"scripts": {
"start": "node run/server.js",
@@ -29,7 +29,6 @@
"datamaps": "^0.5.9",
"date-fns": "^1.30.1",
"dropzone": "^5.5.1",
- "element-ui": "2.4.11",
"es6-promise": "^4.1.1",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.1.0",
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index d44d64ab3..a6613bec1 100755
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -49,40 +49,49 @@ a,
.copyright {
color: #5a7b02;
}
-gradido-global-color-text {
+.font1_2em {
+ font-size: 1.2em;
+}
+.font2em {
+ font-size: 1.5em;
+}
+.gradido-global-color-text {
color: #3d443b;
}
-gradido-global-color-accent {
+.gradido-global-color-accent {
color: #047006;
}
-gradido-global-color-6e0a9c9e {
+.gradido-global-color-6e0a9c9e {
color: #000;
}
-gradido-global-color-2d0fb154 {
+.gradido-global-color-2d0fb154 {
color: #047006;
}
-gradido-global-color-16efe88c {
+.gradido-global-color-16efe88c {
color: #7ebc55;
}
-gradido-global-color-1939326 {
+.gradido-global-color-1939326 {
color: #f6fff6;
}
-gradido-global-color-9d79fc1 {
+.gradido-global-color-9d79fc1 {
color: #047006;
}
-gradido-global-color-6347f4d {
+.gradido-global-color-6347f4d {
color: #5a7b02;
}
-gradido-global-color-4fbc19a {
+.gradido-global-color-4fbc19a {
color: #014034;
}
-gradido-global-color-d341874 {
+.gradido-global-color-d341874 {
color: #b6d939;
}
-gradido-global-color-619d338 {
+.gradido-global-color-619d338 {
color: #8ebfb1;
}
-gradido-global-color-44819a9 {
+.gradido-global-color-44819a9 {
color: #026873;
}
+.gradido-global-color-gray {
+ color: #858383;
+}
diff --git a/frontend/src/components/LoadingPanel.vue b/frontend/src/components/LoadingPanel.vue
deleted file mode 100644
index c6b4fd70a..000000000
--- a/frontend/src/components/LoadingPanel.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue
index f1e2a4455..60d835a1a 100755
--- a/frontend/src/components/SidebarPlugin/SideBar.vue
+++ b/frontend/src/components/SidebarPlugin/SideBar.vue
@@ -10,7 +10,7 @@
- {{ pending ? '—' : $n(balance) }} GDD
+ {{ pending ? '—' : $n(balance, 'decimal') }} GDD
diff --git a/frontend/src/components/index.js b/frontend/src/components/index.js
index a6960c636..c75b2a8fa 100755
--- a/frontend/src/components/index.js
+++ b/frontend/src/components/index.js
@@ -20,7 +20,6 @@ import Collapse from './Collapse/Collapse.vue'
import CollapseItem from './Collapse/CollapseItem.vue'
import Modal from './Modal.vue'
import BaseSlider from './BaseSlider.vue'
-import LoadingPanel from './LoadingPanel.vue'
import BasePagination from './BasePagination.vue'
@@ -48,5 +47,4 @@ export {
BaseButton,
Collapse,
CollapseItem,
- LoadingPanel,
}
diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js
index fa4bf388b..db60d2b84 100644
--- a/frontend/src/config/index.js
+++ b/frontend/src/config/index.js
@@ -1,7 +1,8 @@
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
// Load Package Details for some default values
-// const pkg = require('../../package')
+const pkg = require('../../package')
+
const environment = {
NODE_ENV: process.env.NODE_ENV,
DEBUG: process.env.NODE_ENV !== 'production' || false,
@@ -17,6 +18,7 @@ const server = {
const CONFIG = {
...environment,
...server,
+ APP_VERSION: pkg.version,
}
export default CONFIG
diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js
index 20d578e75..d91acfb79 100644
--- a/frontend/src/i18n.js
+++ b/frontend/src/i18n.js
@@ -32,18 +32,51 @@ function loadLocaleMessages() {
}
const numberFormats = {
- 'en-US': {
- currency: {
- style: 'currency',
- currency: 'GDD',
- abbreviate: true,
+ en: {
+ decimal: {
+ style: 'decimal',
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
},
},
- 'de-DE': {
- currency: {
- style: 'currency',
- currency: 'GDD',
- abbreviate: true,
+ de: {
+ decimal: {
+ style: 'decimal',
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ },
+ },
+}
+
+const dateTimeFormats = {
+ en: {
+ short: {
+ year: 'numeric',
+ month: 'numeric',
+ day: 'numeric',
+ },
+ long: {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ weekday: 'short',
+ hour: 'numeric',
+ minute: 'numeric',
+ },
+ },
+ de: {
+ short: {
+ day: 'numeric',
+ month: 'numeric',
+ year: 'numeric',
+ },
+ long: {
+ day: 'numeric',
+ month: 'short',
+ year: 'numeric',
+ weekday: 'short',
+ hour: 'numeric',
+ minute: 'numeric',
},
},
}
@@ -53,4 +86,5 @@ export default new VueI18n({
fallbackLocale: 'en',
messages: loadLocaleMessages(),
numberFormats,
+ dateTimeFormats,
})
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 84236f71d..81fb90972 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -18,6 +18,7 @@
"de": "Deutsch",
"en": "English"
},
+ "decay": "Vergänglichkeit",
"form": {
"cancel":"Abbrechen",
"reset": "Zurücksetzen",
@@ -84,7 +85,9 @@
},
"thx": {
"title": "Danke!",
- "subtitle": "Wir haben dir eine eMail gesendet."
+ "email": "Wir haben dir eine eMail gesendet.",
+ "reset": "Dein Passwort wurde geändert.",
+ "register": "Du bist jetzt regisriert."
},
"overview":{
"account_overview":"Kontoübersicht",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 9a4a42314..58ebbf9f1 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -18,6 +18,7 @@
"de": "Deutsch",
"en": "English"
},
+ "decay": "Decay",
"form": {
"cancel":"Cancel",
"reset": "Reset",
@@ -84,7 +85,9 @@
},
"thx": {
"title": "Thank you!",
- "subtitle": "We have sent you an email."
+ "email": "We have sent you an email.",
+ "reset": "Your password has been changed.",
+ "register": "You are registred now."
},
"overview":{
"account_overview":"Account overview",
diff --git a/frontend/src/plugins/dashboard-plugin.js b/frontend/src/plugins/dashboard-plugin.js
index 6bafb569e..b7c0ea06c 100755
--- a/frontend/src/plugins/dashboard-plugin.js
+++ b/frontend/src/plugins/dashboard-plugin.js
@@ -11,10 +11,6 @@ import GlobalDirectives from './globalDirectives'
// Sidebar on the right. Used as a local plugin in DashboardLayout.vue
import SideBar from '@/components/SidebarPlugin'
-// element ui language configuration
-import lang from 'element-ui/lib/locale/lang/en'
-import locale from 'element-ui/lib/locale'
-
// vue-bootstrap
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
@@ -38,7 +34,6 @@ import VueMoment from 'vue-moment'
import Loading from 'vue-loading-overlay'
// import the styles
import 'vue-loading-overlay/dist/vue-loading.css'
-locale.use(lang)
Object.keys(rules).forEach((rule) => {
extend(rule, {
diff --git a/frontend/src/plugins/globalComponents.js b/frontend/src/plugins/globalComponents.js
index 7428dec6b..312f19296 100755
--- a/frontend/src/plugins/globalComponents.js
+++ b/frontend/src/plugins/globalComponents.js
@@ -13,7 +13,6 @@ import BaseAlert from '@/components/BaseAlert'
import BaseNav from '@/components/Navbar/BaseNav'
import BaseHeader from '@/components/BaseHeader'
import { ValidationProvider, ValidationObserver } from 'vee-validate'
-import { Input, Tooltip, Popover } from 'element-ui'
/**
* You can register global components here and use them as a plugin in your main Vue instance
*/
@@ -34,11 +33,8 @@ const GlobalComponents = {
Vue.component(Card.name, Card)
Vue.component(Modal.name, Modal)
Vue.component(StatsCard.name, StatsCard)
- Vue.component(Input.name, Input)
Vue.component('validation-provider', ValidationProvider)
Vue.component('validation-observer', ValidationObserver)
- Vue.use(Tooltip)
- Vue.use(Popover)
},
}
diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js
index e9bcf38c8..16ab3d78f 100755
--- a/frontend/src/routes/routes.js
+++ b/frontend/src/routes/routes.js
@@ -16,7 +16,7 @@ const routes = [
},
{
path: '/profile',
- component: () => import('../views/Pages/UserProfileCard.vue'),
+ component: () => import('../views/Pages/UserProfile.vue'),
meta: {
requiresAuth: true,
},
@@ -47,8 +47,16 @@ const routes = [
component: () => import('../views/Pages/Login.vue'),
},
{
- path: '/thx',
+ path: '/thx/:comingFrom',
component: () => import('../views/Pages/thx.vue'),
+ beforeEnter: (to, from, next) => {
+ const validFrom = ['password', 'reset', 'register']
+ if (!validFrom.includes(from.path.split('/')[1])) {
+ next({ path: '/login' })
+ } else {
+ next()
+ }
+ },
},
{
path: '/password',
diff --git a/frontend/src/views/Pages/AccountOverview.spec.js b/frontend/src/views/Pages/AccountOverview.spec.js
index 0ee75ef9f..031828129 100644
--- a/frontend/src/views/Pages/AccountOverview.spec.js
+++ b/frontend/src/views/Pages/AccountOverview.spec.js
@@ -28,7 +28,7 @@ describe('AccountOverview', () => {
})
it('has a transactions table', () => {
- expect(wrapper.find('gdd-table-stub').exists()).toBeTruthy()
+ expect(wrapper.find('gdd-transaction-list-stub').exists()).toBeTruthy()
})
})
})
diff --git a/frontend/src/views/Pages/AccountOverview.vue b/frontend/src/views/Pages/AccountOverview.vue
index 7753b1427..5f262f627 100644
--- a/frontend/src/views/Pages/AccountOverview.vue
+++ b/frontend/src/views/Pages/AccountOverview.vue
@@ -28,7 +28,7 @@
-
-
+
diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.spec.js b/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.spec.js
new file mode 100644
index 000000000..8457d2ad3
--- /dev/null
+++ b/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.spec.js
@@ -0,0 +1,48 @@
+import { mount, RouterLinkStub } from '@vue/test-utils'
+import GddTransactionListFooter from './GddTransactionListFooter'
+
+const localVue = global.localVue
+
+describe('GddTransactionListFooter', () => {
+ let wrapper
+
+ const mocks = {
+ $t: jest.fn((t) => t),
+ }
+
+ const stubs = {
+ RouterLink: RouterLinkStub,
+ }
+
+ const Wrapper = () => {
+ return mount(GddTransactionListFooter, { localVue, mocks, stubs })
+ }
+
+ describe('mount', () => {
+ beforeEach(() => {
+ wrapper = Wrapper()
+ })
+
+ it('renders the component', () => {
+ expect(wrapper.find('div.list-group').exists()).toBeTruthy()
+ })
+
+ it('contains no text', () => {
+ expect(wrapper.text()).toBe('')
+ })
+ })
+
+ describe('count property is greater than 5', () => {
+ beforeEach(async () => {
+ wrapper.setProps({ count: 6 })
+ })
+
+ it('renders a link to show all', () => {
+ expect(wrapper.text()).toBe('transaction.show_all')
+ })
+
+ it('links to /transactions', () => {
+ expect(wrapper.findComponent(RouterLinkStub).props().to).toBe('/transactions')
+ })
+ })
+})
diff --git a/frontend/src/views/Pages/AccountOverview/GddTableFooter.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.vue
similarity index 91%
rename from frontend/src/views/Pages/AccountOverview/GddTableFooter.vue
rename to frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.vue
index 74f254ebb..0e30d85dc 100644
--- a/frontend/src/views/Pages/AccountOverview/GddTableFooter.vue
+++ b/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.vue
@@ -13,7 +13,7 @@
diff --git a/frontend/test/testSetup.js b/frontend/test/testSetup.js
index 457c13f45..f9c49880e 100644
--- a/frontend/test/testSetup.js
+++ b/frontend/test/testSetup.js
@@ -1,5 +1,4 @@
import { createLocalVue } from '@vue/test-utils'
-import ElementUI from 'element-ui'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
import Vuex from 'vuex'
import { ValidationProvider, ValidationObserver, extend } from 'vee-validate'
@@ -17,6 +16,8 @@ import VueQrcode from 'vue-qrcode'
import BaseHeader from '@/components/BaseHeader'
import StatsCard from '@/components/Cards/StatsCard.vue'
+import VueMoment from 'vue-moment'
+
import clickOutside from '@/directives/click-ouside.js'
global.localVue = createLocalVue()
@@ -28,7 +29,6 @@ Object.keys(rules).forEach((rule) => {
})
})
-global.localVue.use(ElementUI)
global.localVue.use(BootstrapVue)
global.localVue.use(Vuex)
global.localVue.use(IconsPlugin)
@@ -37,6 +37,7 @@ global.localVue.use(Notifications)
global.localVue.use(SideBar)
global.localVue.use(VueRouter)
global.localVue.use(VueQrcode)
+global.localVue.use(VueMoment)
global.localVue.component(BaseInput.name, BaseInput)
global.localVue.component('validation-provider', ValidationProvider)
global.localVue.component('validation-observer', ValidationObserver)
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 1f293d882..333df7d04 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -2749,13 +2749,6 @@ async-limiter@~1.0.0:
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
-async-validator@~1.8.1:
- version "1.8.5"
- resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.8.5.tgz#dc3e08ec1fd0dddb67e60842f02c0cd1cec6d7f0"
- integrity sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==
- dependencies:
- babel-runtime "6.x"
-
async@^2.6.2:
version "2.6.3"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
@@ -2829,7 +2822,7 @@ babel-eslint@^10.0.1, babel-eslint@^10.1.0:
eslint-visitor-keys "^1.0.0"
resolve "^1.12.0"
-babel-helper-vue-jsx-merge-props@^2.0.0, babel-helper-vue-jsx-merge-props@^2.0.2:
+babel-helper-vue-jsx-merge-props@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6"
integrity sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==
@@ -3059,7 +3052,7 @@ babel-preset-vue@^2.0.2:
babel-plugin-syntax-jsx "^6.18.0"
babel-plugin-transform-vue-jsx "^3.5.0"
-babel-runtime@6.x, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
@@ -4916,7 +4909,7 @@ deep-is@^0.1.3, deep-is@~0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
-deepmerge@^1.2.0, deepmerge@^1.5.2:
+deepmerge@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753"
integrity sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==
@@ -5296,18 +5289,6 @@ electron-to-chromium@^1.3.649:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.673.tgz#b4f81c930b388f962b7eba20d0483299aaa40913"
integrity sha512-ms+QR2ckfrrpEAjXweLx6kNCbpAl66DcW//3BZD4BV5KhUgr0RZRce1ON/9J3QyA3JO28nzgb5Xv8DnPr05ILg==
-element-ui@2.4.11:
- version "2.4.11"
- resolved "https://registry.yarnpkg.com/element-ui/-/element-ui-2.4.11.tgz#db6a2d37001b8fe5fff9f176fb58bb3908cfa9c9"
- integrity sha512-RtgK0t840NAFTajGMWvylzZRSX1EkZ7V4YgAoBxhv4TtkeMscLuk/IdYOzPdlQq6IN0byx1YVBxCX+u4yYkGvw==
- dependencies:
- async-validator "~1.8.1"
- babel-helper-vue-jsx-merge-props "^2.0.0"
- deepmerge "^1.2.0"
- normalize-wheel "^1.0.1"
- resize-observer-polyfill "^1.5.0"
- throttle-debounce "^1.0.1"
-
elliptic@^6.5.3:
version "6.5.4"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
@@ -9795,11 +9776,6 @@ normalize-url@^3.0.0:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
-normalize-wheel@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz#aec886affdb045070d856447df62ecf86146ec45"
- integrity sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=
-
nouislider@^12.1.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/nouislider/-/nouislider-12.1.0.tgz#a4416b4b3357e77e52217f8ecf060eb14a855f59"
@@ -12704,11 +12680,6 @@ throat@^5.0.0:
resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b"
integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==
-throttle-debounce@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz#51853da37be68a155cb6e827b3514a3c422e89cd"
- integrity sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==
-
through2@^2.0.0, through2@~2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
diff --git a/login_server/CMakeLists.txt b/login_server/CMakeLists.txt
index 64f3d7eb3..2a392f246 100644
--- a/login_server/CMakeLists.txt
+++ b/login_server/CMakeLists.txt
@@ -139,13 +139,22 @@ FOREACH(proto ${DATAMODEL_HEDERA_PROTOS})
ENDFOREACH(proto)
############################## parse cpsp Files ####################################
+
+IF(WIN32)
+ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+ conan_basic_setup()
+ #add_compile_definitions(POCO_NETSSL_WIN)
+ENDIF()
+
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/cpsp GRADIDO_CPSP_PAGE_SRC_PATH)
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/http_pages GRADIDO_HTTP_PAGES_PATH)
file(MAKE_DIRECTORY ${GRADIDO_HTTP_PAGES_PATH})
FILE(GLOB GRADIDO_HTTP_PAGES_SRC "${GRADIDO_CPSP_PAGE_SRC_PATH}/*.cpsp")
IF(WIN32)
+ string(REGEX REPLACE "(.*)package/([a-f0-9]*)" "\\1build/\\2/build/bin" POCO_BUILD_BIN "${CONAN_POCO_ROOT}")
find_program(POCO_PAGE_COMPILER cpspc.exe PATHS "${CONAN_POCO_ROOT}")
+ find_program(POCO_PAGE_COMPILER cpspc.exe PATHS "${POCO_BUILD_BIN}")
ELSE()
find_program(POCO_PAGE_COMPILER cpspc PATHS "${CMAKE_CURRENT_SOURCE_DIR}/build/bin")
ENDIF()
@@ -159,15 +168,27 @@ FOREACH(cpsp_file ${GRADIDO_HTTP_PAGES_SRC})
FILE(TO_NATIVE_PATH ${GRADIDO_HTTP_PAGES_PATH}/${cpsp_file_parsed}Page.cpp cpsp_file_parsed_native)
IF(${cpsp_file_native} IS_NEWER_THAN ${cpsp_file_parsed_native})
- EXECUTE_PROCESS(
- COMMAND
- ${POCO_PAGE_COMPILER}
- --output-dir=${GRADIDO_HTTP_PAGES_PATH}
- --header-output-dir=${GRADIDO_HTTP_PAGES_PATH}
- --noline
- ${cpsp_file_native}
- RESULT_VARIABLE rv
- )
+ IF(WIN32)
+ EXECUTE_PROCESS(
+ COMMAND
+ ${POCO_PAGE_COMPILER}
+ /output-dir=${GRADIDO_HTTP_PAGES_PATH}
+ /header-output-dir=${GRADIDO_HTTP_PAGES_PATH}
+ /noline
+ ${cpsp_file_native}
+ RESULT_VARIABLE rv
+ )
+ ELSE()
+ EXECUTE_PROCESS(
+ COMMAND
+ ${POCO_PAGE_COMPILER}
+ --output-dir=${GRADIDO_HTTP_PAGES_PATH}
+ --header-output-dir=${GRADIDO_HTTP_PAGES_PATH}
+ --noline
+ ${cpsp_file_native}
+ RESULT_VARIABLE rv
+ )
+ ENDIF()
# Optional, but that can show the user if something have gone wrong with the proto generation
IF(${rv})
MESSAGE("Generation of HTTP Page return ${rv} for cpsp ${cpsp_file_native}")
@@ -244,11 +265,7 @@ if(MSVC)
source_group("Test" FILES ${TEST})
endif()
-IF(WIN32)
- include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
- conan_basic_setup()
- #add_compile_definitions(POCO_NETSSL_WIN)
-ENDIF()
+
add_executable(Gradido_LoginServer ${LOCAL_SRCS})
diff --git a/login_server/src/cpp/JSONInterface/JsonCreateTransaction.cpp b/login_server/src/cpp/JSONInterface/JsonCreateTransaction.cpp
index 786af9d71..7fb40913e 100644
--- a/login_server/src/cpp/JSONInterface/JsonCreateTransaction.cpp
+++ b/login_server/src/cpp/JSONInterface/JsonCreateTransaction.cpp
@@ -108,6 +108,9 @@ Poco::JSON::Object* JsonCreateTransaction::transfer(Poco::Dynamic::Var params)
else {
result = stateError("parameter format unknown");
}
+ if (mMemo.size() < 5 || mMemo.size() > 150) {
+ result = stateError("memo is not set or not in expected range [5;150]");
+ }
if (result) {
mm->releaseMemory(target_pubkey);
return result;
diff --git a/login_server/src/cpp/SingletonManager/PendingTasksManager.cpp b/login_server/src/cpp/SingletonManager/PendingTasksManager.cpp
index 619c6382b..c5200b766 100644
--- a/login_server/src/cpp/SingletonManager/PendingTasksManager.cpp
+++ b/login_server/src/cpp/SingletonManager/PendingTasksManager.cpp
@@ -180,31 +180,43 @@ std::vector> PendingTasksManager::getTran
void PendingTasksManager::checkForFinishedTasks(Poco::Timer& timer)
{
+ static const char* function_name = "PendingTasksManager::checkForFinishedTasks";
Poco::ScopedLock _lock(mWorkMutex);
+ try {
- for (auto map_it = mPendingTasks.begin(); map_it != mPendingTasks.end(); map_it++)
- {
- auto list = map_it->second;
- for (auto list_it = list->begin(); list_it != list->end(); list_it++)
+ for (auto map_it = mPendingTasks.begin(); map_it != mPendingTasks.end(); map_it++)
{
- if ((*list_it)->getModel()->isGradidoTransaction()) {
- auto transaction = dynamic_cast(list_it->get());
- auto json = transaction->getModel()->getResultJson();
- bool removeIt = false;
- if (!json.isNull()) {
- auto state = json->get("state");
- if (!state.isEmpty() && state.toString() == "success") {
- removeIt = true;
+ auto list = map_it->second;
+ for (auto list_it = list->begin(); list_it != list->end(); list_it++)
+ {
+ if ((*list_it)->getModel()->isGradidoTransaction()) {
+ auto transaction = dynamic_cast(list_it->get());
+ auto json = transaction->getModel()->getResultJson();
+ bool removeIt = false;
+ if (!json.isNull()) {
+ auto state = json->get("state");
+ if (!state.isEmpty() && state.toString() == "success") {
+ removeIt = true;
+ }
+ }
+ if (removeIt) {
+ transaction->deleteFromDB();
+ list_it = list->erase(list_it);
+ if (!list->size() || list_it == list->end()) break;
}
- }
- if (removeIt) {
- transaction->deleteFromDB();
- list_it = list->erase(list_it);
- if (!list->size()) break;
}
}
}
}
+ catch (Poco::Exception& ex) {
+ NotificationList errors;
+ errors.addError(new ParamError(function_name, "poco exception", ex.displayText()));
+ errors.sendErrorsAsEmail();
+ } catch(std::exception& ex) {
+ NotificationList errors;
+ errors.addError(new ParamError(function_name, "std::exception", ex.what()));
+ errors.sendErrorsAsEmail();
+ }
}
Poco::AutoPtr PendingTasksManager::getPendingTask(int pendingTaskId)
diff --git a/login_server/src/cpp/model/gradido/TransactionBase.h b/login_server/src/cpp/model/gradido/TransactionBase.h
index 6a82b2a28..9f5a87d85 100644
--- a/login_server/src/cpp/model/gradido/TransactionBase.h
+++ b/login_server/src/cpp/model/gradido/TransactionBase.h
@@ -31,7 +31,8 @@ namespace model {
TRANSACTION_VALID_INVALID_AMOUNT,
TRANSACTION_VALID_INVALID_PUBKEY,
TRANSACTION_VALID_INVALID_GROUP_ALIAS,
- TRANSACTION_VALID_INVALID_SIGN
+ TRANSACTION_VALID_INVALID_SIGN,
+ TRANSACTION_VALID_INVALID_MEMO
};
const char* TransactionValidationToString(TransactionValidation result);
diff --git a/login_server/src/cpp/model/gradido/TransactionTransfer.cpp b/login_server/src/cpp/model/gradido/TransactionTransfer.cpp
index 759d79690..ef0d3a3f6 100644
--- a/login_server/src/cpp/model/gradido/TransactionTransfer.cpp
+++ b/login_server/src/cpp/model/gradido/TransactionTransfer.cpp
@@ -186,6 +186,10 @@ namespace model {
addError(new Error(function_name, "sender and receiver are the same"));
return TRANSACTION_VALID_INVALID_PUBKEY;
}
+ if (mMemo.size() < 5 || mMemo.size() > 150) {
+ addError(new Error(function_name, "memo is not set or not in expected range [5;150]"));
+ return TRANSACTION_VALID_INVALID_MEMO;
+ }
return TRANSACTION_VALID_OK;
}
diff --git a/package.json b/package.json
index 0ebef23ff..c2f93ac22 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gradido",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Gradido",
"main": "index.js",
"repository": "git@github.com:gradido/gradido.git",