You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "zhoulii (via GitHub)" <gi...@apache.org> on 2023/04/25 03:54:58 UTC

[GitHub] [incubator-streampark] zhoulii opened a new pull request, #2696: [Improve] generate and return random password when reset user password

zhoulii opened a new pull request, #2696:
URL: https://github.com/apache/incubator-streampark/pull/2696

   ## What changes were proposed in this pull request
   
   generate and return random password to solve possible security issue.
   
   ## Verifying this change
   
   - *Manually verified the change by testing locally.*
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): (**yes** / no)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2696: [Improve] generate and return random password when reset user password

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2696:
URL: https://github.com/apache/incubator-streampark/pull/2696#discussion_r1175998431


##########
streampark-console/streampark-console-webapp/src/views/system/user/User.vue:
##########
@@ -160,8 +160,14 @@
       async function handleReset(record: Recordable) {
         const hide = createMessage.loading('reseting');
         try {
-          await resetPassword({ usernames: record.username });
-          Swal.fire(t('system.user.table.resetSuccess', [record.username]), '', 'success');
+          const resp = await resetPassword({ username: record.username });
+          if (resp.data.code == 200) {
+            Swal.fire({
+              icon: 'success',
+              title: 'New Password',
+              html: '<pre class="api-exception"> The new password is: ' + resp.data.data + '</pre>',

Review Comment:
   need to support i18n.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java:
##########
@@ -49,6 +49,8 @@ public class User implements Serializable {
 
   public static final String SEX_UNKNOWN = "2";
 
+  public static final Integer DEFAULT_PASSWORD_LENGTH = 8;
+
   public static final String DEFAULT_PASSWORD = "streampark666";

Review Comment:
   delete line 54.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] zhoulii commented on a diff in pull request #2696: [Improve] generate and return random password when reset user password

Posted by "zhoulii (via GitHub)" <gi...@apache.org>.
zhoulii commented on code in PR #2696:
URL: https://github.com/apache/incubator-streampark/pull/2696#discussion_r1176044115


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java:
##########
@@ -49,6 +49,8 @@ public class User implements Serializable {
 
   public static final String SEX_UNKNOWN = "2";
 
+  public static final Integer DEFAULT_PASSWORD_LENGTH = 8;
+
   public static final String DEFAULT_PASSWORD = "streampark666";

Review Comment:
   done



##########
streampark-console/streampark-console-webapp/src/views/system/user/User.vue:
##########
@@ -160,8 +160,14 @@
       async function handleReset(record: Recordable) {
         const hide = createMessage.loading('reseting');
         try {
-          await resetPassword({ usernames: record.username });
-          Swal.fire(t('system.user.table.resetSuccess', [record.username]), '', 'success');
+          const resp = await resetPassword({ username: record.username });
+          if (resp.data.code == 200) {
+            Swal.fire({
+              icon: 'success',
+              title: 'New Password',
+              html: '<pre class="api-exception"> The new password is: ' + resp.data.data + '</pre>',

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys merged pull request #2696: [Improve] generate and return random password when reset user password

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys merged PR #2696:
URL: https://github.com/apache/incubator-streampark/pull/2696


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org